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.