You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Conversion of type 'FunctionConstructor' to type 'PropType<(val: number) => void>' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
We have to write with as unknown, but I feel this is redundant.
FunctionasunknownasPropType<(val: number)=>void>//work as well
What does the proposed API look like?
FunctionasPropType<(val: number)=>void>
The text was updated successfully, but these errors were encountered:
hareku
changed the title
Improve PropType with Function
Improve PropType Function
Mar 11, 2020
What problem does this feature solve?
A TypeScript error occures on this example code.
We have to write with
as unknown
, but I feel this is redundant.What does the proposed API look like?
The text was updated successfully, but these errors were encountered: