Closed usersaurus closed 5 years ago
Importing the library in a clean create-react-app ts project is throwing the following error in IScry.d.ts
Property 'gatherer' of type 'string | undefined' is not assignable to string index type 'string'.
The same is happening in the following interfaces
`export interface RelatedUris { gatherer?: string; tcgplayer_decks?: string; edhrec?: string; mtgtop8?: string;
}`
`export interface PurchaseUris { amazon?: string; ebay?: string; tcgplayer?: string; magiccardmarket?: string; cardhoarder?: string; card_kingdom?: string; mtgo_traders?: string; coolstuffinc?: string;
Removing ? in all these types fix the problem (and, as far as I know, that info is always populated by scryfall api).
?
Don't know if I'm missing something. If not, I'm able to PR the change.
What version of typescript are you using?
Oh, sorry. Tried with Typescript 3.1.3 and 3.1.5.
Not working correctly in 3.1.6 too
Should be fixed as of v1.3.3
Importing the library in a clean create-react-app ts project is throwing the following error in IScry.d.ts
Property 'gatherer' of type 'string | undefined' is not assignable to string index type 'string'.
The same is happening in the following interfaces
`export interface RelatedUris { gatherer?: string; tcgplayer_decks?: string; edhrec?: string; mtgtop8?: string;
}`
`export interface PurchaseUris { amazon?: string; ebay?: string; tcgplayer?: string; magiccardmarket?: string; cardhoarder?: string; card_kingdom?: string; mtgo_traders?: string; coolstuffinc?: string;
}`
Removing
?
in all these types fix the problem (and, as far as I know, that info is always populated by scryfall api).Don't know if I'm missing something. If not, I'm able to PR the change.