bknd
Version:
Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, React Router, Astro, Cloudflare, Bun, Node, AWS Lambda & more.
14 lines (13 loc) • 517 B
TypeScript
export type BindingTypeMap = {
D1Database: D1Database;
KVNamespace: KVNamespace;
DurableObjectNamespace: DurableObjectNamespace;
R2Bucket: R2Bucket;
};
export type GetBindingType = keyof BindingTypeMap;
export type BindingMap<T extends GetBindingType> = {
key: string;
value: BindingTypeMap[T];
};
export declare function getBindings<T extends GetBindingType>(env: any, type: T): BindingMap<T>[];
export declare function getBinding<T extends GetBindingType>(env: any, type: T): BindingMap<T>;