Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS2769: No overload matches this call.   Overload 1 of 2, '(props: InputTextProps | Readonly<InputTextProps>): InputText', gave the following error. #2274

Closed
guhyeon opened this issue Sep 3, 2021 · 0 comments
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@guhyeon
Copy link
Contributor

guhyeon commented Sep 3, 2021

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")

[X] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

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

  • React version:

16.12.0

  • PrimeReact version:

6.5.1

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

chrome all

  • Language: [all | TypeScript X.X | ES6/7 | ES5]
  • TypeScript 4.1.3
guhyeon pushed a commit to guhyeon/primereact that referenced this issue Sep 3, 2021
guhyeon pushed a commit to guhyeon/primereact that referenced this issue Sep 3, 2021
@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label Nov 3, 2021
@mertsincan mertsincan added this to the 7.0.0.Final milestone Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

2 participants