feat: init
This commit is contained in:
26
functions/env.ts
Normal file
26
functions/env.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
interface ListResult {
|
||||
complete: boolean;
|
||||
cursor: string;
|
||||
keys: Array<ListKey>;
|
||||
}
|
||||
interface ListKey {
|
||||
key: string;
|
||||
}
|
||||
declare class KVNamespace {
|
||||
put(
|
||||
key: string,
|
||||
value: string | ArrayBuffer | ArrayBufferView | ReadableStream
|
||||
): Promise<void>;
|
||||
get(
|
||||
key: string,
|
||||
object?: { type: string }
|
||||
): Promise<string | object | ArrayBuffer | ReadableStream>;
|
||||
delete(key: string): Promise<void>;
|
||||
list(config: {
|
||||
prefix?: string;
|
||||
limit?: number;
|
||||
cursor?: string;
|
||||
}): Promise<ListResult>;
|
||||
}
|
||||
|
||||
export type { KVNamespace };
|
||||
Reference in New Issue
Block a user