Describe the bug
VSCode does not display the correct types inside a .d.ts + .js project.
To Reproduce
- Create a new deno project
- Open it in VSCode
- Replace all files in it with the following files:
deno.json:
{
"tasks": {
"dev": "deno run --watch main.ts"
},
"imports": {
"@std/assert": "jsr:@std/assert@1"
},
"exports": "./mod.js",
"compilerOptions": {
"strict": false,
"checkJs": true
}
}
mod.js:
// @ts-self-types="./mod.d.ts"
function fetchData(url, options, method, parseJSON) {}
mod.d.ts:
declare function fetchData(url: URL, options: any, method?: string, parseJSON?: boolean): Promise<any>;
export {
fetchData
}
Expected behavior
When hovering over fetchData in mod.js, the signature should be
function fetchData(url: URL, options: any, method?: string, parseJSON?: boolean): Promise<any>
Actual behavior
The signature is
function fetchData(url: any, options: any, method: any, parseJSON: any): void
(Maybe this actually is expected behavior, in which case I could call this issue a feature request :))
Screenshots
Versions
vscode: 1.107.1 deno: 2.6.3 typescript: 5.9.2 extension: 3.47.0
Describe the bug
VSCode does not display the correct types inside a
.d.ts+.jsproject.To Reproduce
deno.json:{ "tasks": { "dev": "deno run --watch main.ts" }, "imports": { "@std/assert": "jsr:@std/assert@1" }, "exports": "./mod.js", "compilerOptions": { "strict": false, "checkJs": true } }mod.js:mod.d.ts:Expected behavior
When hovering over
fetchDatainmod.js, the signature should beActual behavior
The signature is
(Maybe this actually is expected behavior, in which case I could call this issue a feature request :))
Screenshots
Versions
vscode: 1.107.1 deno: 2.6.3 typescript: 5.9.2 extension: 3.47.0