[Canary] DOM is not being included when declared as a lib in tsconfig
See original GitHub issueDescribe the bug
deno-ts reports problems whenever dom types are used even when dom
is declared as a lib in a tsconfig file.
Example of problem reported:
Cannot find name 'document'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
Including ESNext
, deno.window
or es6
(and others) as libs seemingly work as intended so this seems to be specifically related to including dom
within either the extension or the language service as using the same tsconfig with the --config
flag for bundling works.
Used Configs vscode settings.json:
{
"deno.config": "./tsconfig.json",
"deno.enable": true,
"deno.lint": true,
}
tsconfig.json:
{
"compilerOptions": {
"lib": [ "ESNext", "dom", ],
},
}
Expected behavior
Deno should not report problems for DOM types when included as a lib within a tsconfig file.
Versions vscode: 1.54.0-insider (Also checked on 1.53.0) deno: 1.7.2 (release, x86_64-pc-windows-msvc) extension: denoland.vscode-deno-canary 0.0.8
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:9 (3 by maintainers)
Encountering the exact same issue.
Currently the extension is telling me
Cannot find name 'console'. Do you need to change your target library? Try changing the
libcompiler option to include 'dom'.deno-ts(2584)
Even though I got
I believe this is now fixed in 3.0.1 and Deno 1.7.5.