Decorators

@system-inc/base-foundation · 515c140 · 2 symbols

Injects a KeyValueStorage bound to the KV namespace declared by the given KeyValueStorageBinding.

InjectKeyValueStorage(keyValueStorageToken: KeyValueStorageBinding): TypedParameterDecorator<KeyValueStorage>

View source ↗

Injects an ObjectStore bound to the bucket declared by the given ObjectStoreBinding.

The bucket must be declared in the worker's objectStore.buckets settings and bound in wrangler.toml. Consumers can use this decorator without opting into the higher-level FileStorage module.

InjectObjectStore(bucketToken: ObjectStoreBinding): TypedParameterDecorator<ObjectStore>

View source ↗