chore: add typecheck script and fix pre-existing TypeScript errors

- Add `typecheck` script (`tsc --noEmit`) to package.json
- Remove conflicting `declare global` from test/setup.ts (superseded
  by @cloudflare/workers-types); use `globalThis as any` for test globals
  and declare minimal `require` locally to avoid pulling in @types/node
- Cast `createMockEnv()` and `deleteRes.json()` results in admin.test.ts
  to silence strict `unknown` / MockKV-vs-KVNamespace errors

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Julien Herr
2026-05-20 22:54:32 +02:00
parent 3ed9d2ee22
commit 29446a2aac
3 changed files with 32 additions and 38 deletions
+2 -1
View File
@@ -10,7 +10,8 @@
"deploy": "wrangler deploy --env production",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage"
"test:coverage": "vitest run --coverage",
"typecheck": "tsc --noEmit"
},
"author": "",
"license": "MIT",