mirror of
https://github.com/denoland/deno.git
synced 2025-10-02 07:01:16 +00:00
fix(lsp): improved cjs tracking (#23374)
Our cjs tracking was a bit broken. It was marking stuff as esm that was actually cjs leading to type checking errors.
This commit is contained in:
parent
7e4ee02e2e
commit
6f278e5c40
16 changed files with 263 additions and 102 deletions
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"tempDir": true,
|
||||
"envs": {
|
||||
"DENO_FUTURE": "1"
|
||||
},
|
||||
"steps": [{
|
||||
"commandName": "npm",
|
||||
"args": "install",
|
||||
"output": "[WILDCARD]"
|
||||
}, {
|
||||
"args": "check main.ts",
|
||||
"exitCode": 1,
|
||||
"output": "main.out"
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
Check file:///[WILDLINE]/main.ts
|
||||
error: TS2345 [ERROR]: Argument of type 'string' is not assignable to parameter of type 'number'.
|
||||
add(1, "test"); // should error
|
||||
~~~~~~
|
||||
at file:///[WILDLINE]/main.ts:3:8
|
|
@ -0,0 +1,3 @@
|
|||
import { add } from "@denotest/cjs-internal-types-default-export";
|
||||
|
||||
add(1, "test"); // should error
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"@denotest/cjs-internal-types-default-export": "*"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue