Use the unknown type in typescript 3.0 to improve defintions #14044
Labels
help wanted
The suggestion or request has been accepted, we need you to help us by sending a pull request.
Inactive
What problem does this feature solve?
Let's take
Table.Column
for an example:It's very easy to mistake
text
asrecord
and write down<Column render={item => item.prop}/>
What does the proposed API look like?
Replace
any
withunknown
when it makes sense.Definition of
render
should berender?: (text: unknown, record: T, index: number) => React.ReactNode;
Note:
unknown
is a breaking change to TS 2.x users.The text was updated successfully, but these errors were encountered: