This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useRef } from 'react'; | |
import { StyleSheet, TextInput, TextInputProps, TouchableWithoutFeedback, View } from 'react-native'; | |
import { FONT } from '../../../styles/fonts'; | |
import { SEMANTIC_COLOR } from '../../../styles/semanticColors'; | |
import TextFieldTitle, { TextFieldTitleProps } from './TextFieldTitle'; | |
type OmitTextInputProps = Omit<TextInputProps, 'placeholder' | 'placeholderTextColor' | 'allowFontScaling' | 'multiline'>; | |
type TextFieldInternalProps = OmitTextInputProps & TextFieldTitleProps; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare namespace jsObject { | |
/** | |
* Extracts the known keys of a given object type using type inference. | |
* | |
* @see [How to omit [key:string]: any from a type in typescript?](https://stackoverflow.com/a/58223140/11455106) | |
* @see [TypeScript: remove index signature using mapped types](https://stackoverflow.com/a/51956054/5669456) | |
* @see [How can I remove a wider type from a union type without removing its subtypes in TypeScript?](https://stackoverflow.com/a/51955852/5669456) | |
*/ | |
type KnownKeyOf<T> = { | |
[K in keyof T]: string extends K ? never : number extends K ? never : K |