refactor(tailshare): keep node types out of the browser project
CI / format (pull_request) Successful in 1m53s
CI / lint (pull_request) Successful in 2m6s
CI / install (pull_request) Successful in 6m6s
CI / typetest (pull_request) Successful in 2m6s
CI / node-tests (pull_request) Successful in 2m20s
CI / typecheck (pull_request) Successful in 2m22s
CI / browser-tests (pull_request) Successful in 3m38s

Adding node types for the new unit tests applied them to every file, so
browser code could import a node builtin and still typecheck. Split the
project: the app compiles with no ambient type packages and excludes the
tests, and a test project adds node types back for the test files alone.

Verified by importing node:fs into a browser module and confirming the
app project rejects it while the test project does not.

Co-Authored-By: claude-opus-5 <noreply@anthropic.com>
This commit was merged in pull request #237.
This commit is contained in:
2026-08-28 17:30:23 +00:00
co-authored by Claude
parent 023814a604
commit c38c78893b
3 changed files with 12 additions and 3 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
"dev": "webpack serve --mode development",
"build": "NODE_ENV=production webpack --mode production",
"test": "tsx --test --test-force-exit 'src/**/*.test.ts'",
"typecheck": "tsc --noEmit"
"typecheck": "tsc --project tsconfig.json --noEmit && tsc --project tsconfig.test.json --noEmit"
},
"dependencies": {
"@mantine/core": "^9.3.1",
+3 -2
View File
@@ -5,7 +5,7 @@
"module": "ESNext",
"moduleResolution": "bundler",
"jsx": "react-jsx",
"types": ["node"],
"types": [],
"strict": true,
"noEmit": true,
"isolatedModules": true,
@@ -14,5 +14,6 @@
"erasableSyntaxOnly": true,
"skipLibCheck": true
},
"include": ["src"]
"include": ["src"],
"exclude": ["src/**/*.test.ts"]
}
+8
View File
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"types": ["node"]
},
"include": ["src/**/*.test.ts"],
"exclude": []
}