vscode_deno
vscode_deno copied to clipboard
Inconsistent behaviour when using triple-slash directives
Describe the bug
Fresh projects include the following triple-slash directives in the main.ts
file.
/// <reference no-default-lib="true" />
/// <reference lib="dom" />
/// <reference lib="dom.iterable" />
/// <reference lib="dom.asynciterable" />
/// <reference lib="deno.ns" />
Now sometimes using unstable APIs does not give an error in the editor but sometimes it does, for example in the SaaSKit project (see https://github.com/denoland/saaskit/pull/279). Setting "deno.unstable": true
does not have any effect.
To Reproduce
I have no idea how to reproduce this. After creating a new clone of the SaaSKit project the error went away but I am not sure why since it was of the same version.
Expected behavior
I expect that using unstable APIs would result in a error, unless explicitly enabled.
Screenshots
Error message: Property 'openKv' does not exist on type 'typeof Deno'. Did you mean 'open'?
Versions
vscode: 1.79.2 deno: 1.34.3 extension: 3.19.1
I have set the extension config
"deno.unstable": true
but Deno.openKv()
is not recognized.
If I add
/// <reference lib="deno.unstable" />
It is recognized.
I was under the impression that setting deno.unstable
to true
should be enough. What is the expected behavior here?
- vscodium 1.80.0
- deno 1.35.1
- extension v3.19.1
@dsherret do you consider this fixed with https://github.com/denoland/deno/pull/19825?
This is caused by https://github.com/denoland/deno/issues/9541 I assume.