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 'restored' does not exist on type 'Store<State>' #238

Open
darrylnoakes opened this issue Aug 23, 2021 · 3 comments
Open

Property 'restored' does not exist on type 'Store<State>' #238

darrylnoakes opened this issue Aug 23, 2021 · 3 comments

Comments

@darrylnoakes
Copy link

Typescript gives me the error "Property 'restored' does not exist on type 'Store'."
I am trying to use the router guard example shown in the docs, along with async storage.

As a workaround, I defined a type named RestorableAsyncStore that extends Store to include the property restored: Promise<any> and then did await (store as RestorableAsyncStore)?.restored.

Any ideas?

@Squix
Copy link

Squix commented Oct 27, 2021

+1

@darrylnoakes
Copy link
Author

darrylnoakes commented Oct 27, 2021

@championswimmer Would a PR be accepted?

@shamscorner
Copy link

Check this solution, though using any is not recommended.
#209 (comment)

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

3 participants