Files
react-native-devtools-frontend/tsconfig.json
T
Jack Franklin 1a0e8dbcc0 Use typeRoots for custom type-defs
crrev.com/c/5081999 added in custom WebGPU types, however doing so via
`types:[]` overrides the TS default behaviour to include types from
`node_modules/@types`. This means in VSCode/LSP based editors, we now
get TS errors in tests from `assert` and `sinon`, which TS now cannot
detect (as it is not reading `node_modules/@types/...`).

To prevent this we can instead use `typeRoots`, and specify the folders
to use. This maintains the default behaviour and adds detection of the
WebGPU types.

Bug: 1506431
Change-Id: Ie5aed47bc630852305ecc101d05d7081dfa71647
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5083022
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2023-12-04 11:57:33 +00:00

23 lines
440 B
JSON

{
"extends": "./config/typescript/tsconfig.base.json",
"compilerOptions": {
"lib": [
"esnext",
"dom",
"dom.iterable",
"webworker",
"webworker.iterable"
],
"typeRoots": ["./node_modules/@types", "./node_modules/@webgpu/types"],
"outDir": "ignored-for-vscode"
},
"include": [
"front_end/",
"test/",
"inspector_overlay"
],
"exclude": [
"front_end/**/*-legacy.ts"
]
}