Files
Move/tsconfig.json
nokeo08 add4a2d60c tsconfig: explicit 'types': ['bun'] for VS Code LSP
bun:test types live in 'bun-types', which is pulled in transitively by
@types/bun via a /// <reference types="bun-types" /> directive. bunx tsc
finds this via auto-discovery, but VS Code's TS Language Server doesn't
always honor auto-discovered @types/* packages under moduleResolution:
bundler, so it shows a phantom 'Cannot find module bun:test' error in
the editor.

Adding 'types': ['bun'] to compilerOptions makes the inclusion explicit
and matches what 'bun init' generates for new projects. tsc still
passes; the bun test suite still passes; the editor LSP now resolves
bun:test correctly.
2026-06-17 21:15:41 -05:00

18 lines
420 B
JSON

{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"noEmit": true,
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"resolveJsonModule": true,
"noUncheckedIndexedAccess": true,
"types": ["bun"]
},
"include": ["src/**/*.ts", "tests/**/*.ts"]
}