vscode_deno
vscode_deno copied to clipboard
Bug: VSCode LSP doesn't recognize deep types when using `sloppy-imports`
Problem
When using Deno's unstable feature sloppy-imports, VSCode's Language Server Protocol (LSP) fails to properly handle type definitions that are re-exported through intermediary files.
Steps
Project Structure
project/
├── deno.json
└── main.ts
shared/
├── mod.ts
└── type.ts
File Contents
project/deno.json
{
"unstable": ["sloppy-imports"]
}
project/main.ts
import { ABC } from "../shared/mod.ts"
const _letter: ABC = "";
shared/mod.ts
export type { ABC } from "./type"
shared/type.ts
export type ABC = "A" | "B" | "C"
Expected behavior
- VSCode should recognize the ABC type through the re-export
- Type checking should flag the empty string assignment as invalid
- IntelliSense should suggest valid values ("A", "B", "C")
Versions
- vscode: 1.94.2
- deno: v2.0.3
- extension: v3.42.0