You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
npm package a has export interface Type<T> { ... }
npm package b depends on a and has export type Type<T> = import("a").Type;
My workspace is using deno.json and this vscode extension.
A file in my workspace has const _: import("b").Type<boolean> = 1; deno check reports a type error as expected.
Vscode also reports it when first opening this workspace or after Deno: Restart Language Server.
But after navigating to the import("b").Type<boolean>, vscode no longer reports this error.
And when I hover the Type, it resolves to any.
Workarounds I have tried:
import("npm:b") doesn't fix it.
import("npm:b") and removing deno.jsondeno.lock fixes it.
I haven't tested whether this would happen using jsr or http with deno.json.
To Reproduce
Create a new folder, with .vscode/settings.json enabling deno, and open it with vscode.
Create a file main.ts with content const _: import("npm:@ipld/dag-pb").ByteView<boolean> = 1;
deno add npm:@ipld/dag-pb
deno check main.ts reports a type error
Open main.ts in vscode, it might reports this error. But after navigating into the type ByteView and come back, it no longer reports the error.
Describe the bug
npm package
a
hasexport interface Type<T> { ... }
npm package
b
depends ona
and hasexport type Type<T> = import("a").Type;
My workspace is using
deno.json
and this vscode extension.A file in my workspace has
const _: import("b").Type<boolean> = 1;
deno check
reports a type error as expected.Vscode also reports it when first opening this workspace or after
Deno: Restart Language Server
.But after navigating to the
import("b").Type<boolean>
, vscode no longer reports this error.And when I hover the
Type
, it resolves toany
.Workarounds I have tried:
import("npm:b")
doesn't fix it.import("npm:b")
and removingdeno.json
deno.lock
fixes it.I haven't tested whether this would happen using
jsr
orhttp
withdeno.json
.To Reproduce
.vscode/settings.json
enabling deno, and open it with vscode.main.ts
with contentconst _: import("npm:@ipld/dag-pb").ByteView<boolean> = 1;
deno add npm:@ipld/dag-pb
deno check main.ts
reports a type errormain.ts
in vscode, it might reports this error. But after navigating into the typeByteView
and come back, it no longer reports the error.I made a repo https://github.com/EqualMa/deno-vscode-inconsistency so you can open it directly.
Expected behavior
Vscode should resolve the re-exported
Type
correctly and reports the type error asdeno check
does.Screenshots
When I first open the workspace, there is a type error as expected:
When I navigate into
ByteView
and come back, there is no error.Versions
vscode: 1.95.2 deno: 2.0.6 extension: v3.42.0
The text was updated successfully, but these errors were encountered: