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

Add type for caches.default #8

Closed
emillime opened this issue Aug 21, 2019 · 2 comments
Closed

Add type for caches.default #8

emillime opened this issue Aug 21, 2019 · 2 comments

Comments

@emillime
Copy link

What is the best way to add the property default on type CacheStorage? It would be nice if this template added it.
If you try to use it right now you get an error saying:

Property 'default' does not exist on type 'CacheStorage'.

@emillime
Copy link
Author

emillime commented Aug 21, 2019

Maybe it's enough to just add this.

declare global {
  const myKVNamespace: KVNamespace;

  interface CacheStorage {
    default: CacheStorage;
  }
}

@EverlastingBugstopper
Copy link
Contributor

Hi! Thanks for checking out this template - I'm going to close this issue as it needs to be resolved in @cloudflare/workers-types (seems like you found an issue there as well 😄) cloudflare/workers-types#8

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