Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6214

What is the meaning of this code in React Native and Typescript?

$
0
0

I have read some codes of my company's project and see something strange and do not know what it is.

What is the meaning of the last '&' and an object { invalidMail?: string, ... }?

const InputValidation: React.ForwardRefExoticComponent<  React.PropsWithoutRef<IInputValidationProps> & React.RefAttributes<TextInput>> & {  invalidMail?: string;  invalidNumber?: string;  invalidPhone?: string;  isRequired?: string;  notPositiveNumber?: string;  lessThanMinLength?: string;} = forwardRef<TextInput, IInputValidationProps>((props, ref) => { ... }InputValidation.invalidMail = 'Mail không hợp lệ';InputValidation.invalidNumber = 'Số không hợp lệ';InputValidation.invalidPhone = 'Sốđiện thoại không hợp lệ';InputValidation.isRequired = 'Bắt buộc';InputValidation.notPositiveNumber = 'Không nhận giá trịâm';InputValidation.lessThanMinLength = 'Số kí tự tối thiểu ';

Does anybody know how this code affect InputValidation component? Thank in advance.


Viewing all articles
Browse latest Browse all 6214

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>