TS2769: No overload matches this call. Overload 1 of 2, '(props: InputTextProps | Readonly<InputTextProps>): InputText', gave the following error. #2274
Labels
Type: Bug
Issue contains a defect related to a specific component.
Milestone
There is no guarantee in receiving an immediate response in GitHub Issue Tracker, If you'd like to secure our response, you may consider PrimeReact PRO Support where support is provided within 4 business hours
I'm submitting a ... (check one with "x")
Codesandbox Case (Bug Reports)
Please fork the codesandbox below and create a case demonstrating your bug report. Issues without a codesandbox have much less possibility to be reviewed.
https://codesandbox.io/s/misty-cache-02ngq?file=/src/App.tsx
Current behavior
TS2769: No overload matches this call. Overload 1 of 2, '(props: InputTextProps | Readonly): InputText', gave the following error. Type 'RefObject' is not assignable to type 'string | (string & ((instance: HTMLInputElement | null) => void)) | (string & RefObject) | (RefObject & string) | ... 6 more ... | undefined'. Type 'RefObject' is not assignable to type '((instance: InputText | null) => void) & RefObject'. Type 'RefObject' is not assignable to type '(instance: InputText | null) => void'. Type 'RefObject' provides no match for the signature '(instance: InputText | null): void'. Overload 2 of 2, '(props: InputTextProps, context: any): InputText', gave the following error. Type 'RefObject' is not assignable to type 'string | (string & ((instance: HTMLInputElement | null) => void)) | (string & RefObject) | (RefObject & string) | ... 6 more ... | undefined'. Type 'RefObject' is not assignable to type '((instance: InputText | null) => void) & RefObject'. Type 'RefObject' is not assignable to type '(instance: InputText | null) => void'.
Expected behavior
No Type Error
Minimal reproduction of the problem with instructions
Please tell us about your environment:
Window, VS CODE, yarn, local
16.12.0
6.5.1
chrome all
The text was updated successfully, but these errors were encountered: