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
However, I get the following type error in my IDE:
No overload matches this call.
Overload 1 of 2, '(props: ICsvDownloadProps | Readonly<ICsvDownloadProps>): CsvDownload', gave the following error.
Type 'Thing[]' is not assignable to type 'Datas | (() => Datas) | (() => Promise<Datas>) | Promise<Datas>'.
Type 'Thing[]' is not assignable to type 'Datas'.
Type 'Thing' is not assignable to type 'string[] | { [key: string]: string | null | undefined; }'.
Type 'Thing' is not assignable to type '{ [key: string]: string | null | undefined; }'.
Property 'id' is incompatible with index signature.
Type 'number' is not assignable to type 'string'.
Overload 2 of 2, '(props: ICsvDownloadProps, context: any): CsvDownload', gave the following error.
Type 'Thing[]' is not assignable to type 'Datas | (() => Datas) | (() => Promise<Datas>) | Promise<Datas>'.ts(2769)
Because datas is expecting string | null | undefined, whereas it should allow anything that can be converted to a string (i.e. string | number | boolean | symbol | object | null | undefined).
Unless I'm missing something silly, I think it should be changed in this line to suit:
Hiya!
In TypeScript, the
CsvDownload
component compiles and runs as intended when passing in an object such as the following:However, I get the following type error in my IDE:
Because
datas
is expectingstring | null | undefined
, whereas it should allow anything that can be converted to a string (i.e.string | number | boolean | symbol | object | null | undefined
).Unless I'm missing something silly, I think it should be changed in this line to suit:
react-csv-downloader/src/lib/csv.ts
Line 8 in 319c8a0
The text was updated successfully, but these errors were encountered: