mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-18 12:34:44 +08:00
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>
23 lines
440 B
JSON
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"
|
|
]
|
|
}
|