feat: init

This commit is contained in:
EdgeOne Pages
2025-12-31 17:08:26 +08:00
commit d22628f972
19 changed files with 7647 additions and 0 deletions

26
functions/env.ts Normal file
View 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 };