diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2023-07-28 11:24:22 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-28 11:24:22 -0400 |
| commit | 279030f2b8564ceed76c0ed08b14ea97e2258215 (patch) | |
| tree | 865327971df6007b3fdf99fd0135c675e8aa0b13 /cli/tests/testdata/npm/file_dts_dmts_dcts | |
| parent | bddf5acf895ed764074a1bb2a8ab124dd70fd313 (diff) | |
fix(npm): improve declaration resolution for filename with different extensions (#19966)
postcss was importing `./index.js` from `./index.d.mts` where there also
existed a `./index.d.ts`.
Closes #19575
Diffstat (limited to 'cli/tests/testdata/npm/file_dts_dmts_dcts')
| -rw-r--r-- | cli/tests/testdata/npm/file_dts_dmts_dcts/main.out | 24 | ||||
| -rw-r--r-- | cli/tests/testdata/npm/file_dts_dmts_dcts/main.ts | 9 |
2 files changed, 33 insertions, 0 deletions
diff --git a/cli/tests/testdata/npm/file_dts_dmts_dcts/main.out b/cli/tests/testdata/npm/file_dts_dmts_dcts/main.out new file mode 100644 index 000000000..c92043f8b --- /dev/null +++ b/cli/tests/testdata/npm/file_dts_dmts_dcts/main.out @@ -0,0 +1,24 @@ +Download http://localhost:4545/npm/registry/@denotest/file-dts-dmts-dcts +Download http://localhost:4545/npm/registry/@denotest/file-dts-dmts-dcts/1.0.0.tgz +Check file:///[WILDCARD]/main.ts +error: TS2322 [ERROR]: Type '5' is not assignable to type '"dts"'. +const value1: Dts1 = 5; + ~~~~~~ + at file:///[WILDCARD] + +TS2322 [ERROR]: Type '5' is not assignable to type '"mts"'. +const value2: Mts1 = 5; + ~~~~~~ + at file:///[WILDCARD] + +TS2322 [ERROR]: Type '5' is not assignable to type '"mts"'. +const value3: Mts2 = 5; + ~~~~~~ + at file:///[WILDCARD] + +TS2322 [ERROR]: Type '5' is not assignable to type '"cts"'. +const value4: Cts1 = 5; + ~~~~~~ + at file:///[WILDCARD] + +Found 4 errors. diff --git a/cli/tests/testdata/npm/file_dts_dmts_dcts/main.ts b/cli/tests/testdata/npm/file_dts_dmts_dcts/main.ts new file mode 100644 index 000000000..63686e2d3 --- /dev/null +++ b/cli/tests/testdata/npm/file_dts_dmts_dcts/main.ts @@ -0,0 +1,9 @@ +import { Value as Dts1 } from "npm:@denotest/file-dts-dmts-dcts/js"; +import { Value as Mts1 } from "npm:@denotest/file-dts-dmts-dcts"; +import { Value as Mts2 } from "npm:@denotest/file-dts-dmts-dcts/mjs"; +import { Value as Cts1 } from "npm:@denotest/file-dts-dmts-dcts/cjs"; + +const value1: Dts1 = 5; +const value2: Mts1 = 5; +const value3: Mts2 = 5; +const value4: Cts1 = 5; |
