Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent behaviour when using triple-slash directives #872

Closed
smitssjors opened this issue Jun 22, 2023 · 4 comments
Closed

Inconsistent behaviour when using triple-slash directives #872

smitssjors opened this issue Jun 22, 2023 · 4 comments
Labels
bug Something isn't working fresh Something is not working with Fresh

Comments

@smitssjors
Copy link

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 denoland/saaskit#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

image

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

@bartlomieju bartlomieju added bug Something isn't working fresh Something is not working with Fresh labels Jul 10, 2023
@zbynekwinkler
Copy link

I have set the extension config

"deno.unstable": true

but Deno.openKv() is not recognized.

image

If I add

/// <reference lib="deno.unstable" />

It is recognized.

image

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

@bartlomieju
Copy link
Member

@dsherret do you consider this fixed with denoland/deno#19825?

@nayeemrmn
Copy link
Collaborator

This is caused by denoland/deno#9541 I assume.

@nayeemrmn
Copy link
Collaborator

We no longer have separate type checking for unstable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fresh Something is not working with Fresh
Projects
None yet
Development

No branches or pull requests

4 participants