Skip to content

Commit edafd70

Browse files
committed
fix(typescript): exclude dist/ from type checking and fix vitest global type
- Add include/exclude to tsconfig.json to prevent checking compiled dist/ files - Exclude test files from type checking (handled by vitest) - Fix vitest.setup.ts global type declaration using type assertion - All TypeScript compilation errors resolved
1 parent 70b96b8 commit edafd70

File tree

3 files changed

+86
-60
lines changed

3 files changed

+86
-60
lines changed

bun.lock

Lines changed: 80 additions & 56 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/test/setup/vitest.setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { vi } from "vitest";
22

33
// Make vi available globally
4-
globalThis.vi = vi;
4+
(globalThis as any).vi = vi;
55

66
// Setup common mocks
77
vi.mock("ws", () => ({

core/tsconfig.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"baseUrl": ".", // Add baseUrl
3+
"baseUrl": ".",
44
"target": "ESNext",
55
"module": "ESNext",
66
"composite": false,
@@ -16,11 +16,13 @@
1616
"preserveWatchOutput": true,
1717
"skipLibCheck": true,
1818
"strict": true,
19-
"types": ["node", "vitest/globals"], // Add vitest globals
19+
"types": ["node", "vitest/globals"],
2020
"allowJs": true,
2121
"checkJs": true,
2222
"lib": ["dom", "dom.iterable", "esnext"],
2323
"emitDeclarationOnly": true,
2424
"outDir": "lib"
25-
}
25+
},
26+
"include": ["src/**/*", "test/**/*"],
27+
"exclude": ["dist", "node_modules", "lib", "docs", "**/*.test.ts"]
2628
}

0 commit comments

Comments
 (0)