app.d.ts
1 declare namespace App { 2 interface Platform { 3 env: { 4 COUNTER: DurableObjectNamespace; 5 }; 6 context: { 7 waitUntil(promise: Promise<any>): void; 8 }; 9 caches: CacheStorage & { default: Cache } 10 } 11 12 interface Locals { 13 user: { 14 name: string; 15 role: string; 16 } | null; 17 password?: string; 18 } 19 }