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

Property 'gatherer' of type 'string | undefined' is not assignable to string index type 'string'. importing the library in a clean project. #11

Closed
usersaurus opened this issue Nov 7, 2018 · 4 comments

Comments

@usersaurus
Copy link
Contributor

usersaurus commented Nov 7, 2018

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; [key: string]: string; }

export interface PurchaseUris { amazon?: string; ebay?: string; tcgplayer?: string; magiccardmarket?: string; cardhoarder?: string; card_kingdom?: string; mtgo_traders?: string; coolstuffinc?: string; [key: string]: 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.

@ChiriVulpes
Copy link
Owner

What version of typescript are you using?

@usersaurus
Copy link
Contributor Author

Oh, sorry. Tried with Typescript 3.1.3 and 3.1.5.

@usersaurus
Copy link
Contributor Author

Not working correctly in 3.1.6 too

@ChiriVulpes
Copy link
Owner

Should be fixed as of v1.3.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants