Closed dhaynespls closed 4 years ago
Yep, Cloudflare helpfully provided the type def! Would you be up for opening a PR?
Types The full signature of the list method (in TypeScript) is:
Namespace.list({prefix?: string, limit?: number, cursor?: string})
All arguments are optional:
prefix
is a string that represents a prefix you can use to filter all keys.limit
is the maximum number of keys returned. The default is 1000, which is the maximum. It is unlikely that you will want to change this default, but it is included for completeness.cursor
is a string used for paginating responses. See below for more.
Yup! Working on it right now.
Should be good to go, let me know if I missed anything!
Hi!
Love that someone's built out types for workers.
In the definition for CloudflareWorkerKV located here: https://sourcegraph.com/github.com/udacity/cloudflare-typescript-workers/-/blob/packages/types-cloudflare-worker/src/global.ts#L384
there isn't a function definition for listing keys documented here: https://developers.cloudflare.com/workers/reference/storage/listing-keys/
Should be a super simple addition.