Skip to content
This repository has been archived by the owner on Dec 31, 2020. It is now read-only.

Edit README to add another strong typing suggestion #350

Closed
wants to merge 1 commit into from

Conversation

hayeah
Copy link
Contributor

@hayeah hayeah commented Oct 31, 2017

No description provided.

@mweststrate
Copy link
Member

I think this suggestion is too ugly to propose as 'solution'. Even // @ts-ignore would be neater ;-)

@hayeah
Copy link
Contributor Author

hayeah commented Nov 2, 2017

hmm, it seems that @ts-ignore only works for .js?

The recommendation for .ts is to cast to any. microsoft/TypeScript#9448

The suggestion in the current README is suitable if strict null check is not enabled. With null-checking enabled, nullable injected store is quite painful to use.

@mweststrate
Copy link
Member

mweststrate commented Nov 2, 2017 via email

@mweststrate
Copy link
Member

mweststrate commented Nov 2, 2017 via email

@hayeah
Copy link
Contributor Author

hayeah commented Nov 2, 2017

oh I didn't know about the ! operator! Thanks, that's much better.

@hayeah hayeah closed this Nov 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants