diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-11-19 10:40:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-19 10:40:01 -0500 |
commit | a57134de38b0609eb485975e6cc47b83dfc5f302 (patch) | |
tree | ed2fb145106a21a2586ffe4ca547a9f719d6f966 /cli/tests | |
parent | 7ab08130a06850f7d30bca8088799926f03e2a84 (diff) |
fix(npm): handle directory resolution when resolving declaration files (#16706)
Also fixes resolving specifiers like `./something.generated` in
declaration files.
Closes #16695
Diffstat (limited to 'cli/tests')
6 files changed, 9 insertions, 0 deletions
diff --git a/cli/tests/testdata/npm/registry/@denotest/check-error/1.0.0/index.d.ts b/cli/tests/testdata/npm/registry/@denotest/check-error/1.0.0/index.d.ts index 673c0035e..bfb0483c2 100644 --- a/cli/tests/testdata/npm/registry/@denotest/check-error/1.0.0/index.d.ts +++ b/cli/tests/testdata/npm/registry/@denotest/check-error/1.0.0/index.d.ts @@ -4,3 +4,7 @@ export class Class1 extends Class2 { export class Class2 extends Class1 { } + +// these should be fine though +export { subDir } from "./sub_dir"; +export { otherDir } from "./other_dir"; diff --git a/cli/tests/testdata/npm/registry/@denotest/check-error/1.0.0/other_dir.d.ts b/cli/tests/testdata/npm/registry/@denotest/check-error/1.0.0/other_dir.d.ts new file mode 100644 index 000000000..e7254c16c --- /dev/null +++ b/cli/tests/testdata/npm/registry/@denotest/check-error/1.0.0/other_dir.d.ts @@ -0,0 +1 @@ +export const otherDir: 2; diff --git a/cli/tests/testdata/npm/registry/@denotest/check-error/1.0.0/other_dir/index.js b/cli/tests/testdata/npm/registry/@denotest/check-error/1.0.0/other_dir/index.js new file mode 100644 index 000000000..56259f22d --- /dev/null +++ b/cli/tests/testdata/npm/registry/@denotest/check-error/1.0.0/other_dir/index.js @@ -0,0 +1 @@ +module.exports.otherDir = 2; diff --git a/cli/tests/testdata/npm/registry/@denotest/check-error/1.0.0/sub_dir/index.d.ts b/cli/tests/testdata/npm/registry/@denotest/check-error/1.0.0/sub_dir/index.d.ts new file mode 100644 index 000000000..f41a696fd --- /dev/null +++ b/cli/tests/testdata/npm/registry/@denotest/check-error/1.0.0/sub_dir/index.d.ts @@ -0,0 +1 @@ +export * from './lib'; diff --git a/cli/tests/testdata/npm/registry/@denotest/check-error/1.0.0/sub_dir/index.js b/cli/tests/testdata/npm/registry/@denotest/check-error/1.0.0/sub_dir/index.js new file mode 100644 index 000000000..3dfac4c23 --- /dev/null +++ b/cli/tests/testdata/npm/registry/@denotest/check-error/1.0.0/sub_dir/index.js @@ -0,0 +1 @@ +module.exports.subDir = 1; diff --git a/cli/tests/testdata/npm/registry/@denotest/check-error/1.0.0/sub_dir/lib.d.ts b/cli/tests/testdata/npm/registry/@denotest/check-error/1.0.0/sub_dir/lib.d.ts new file mode 100644 index 000000000..e5834b52b --- /dev/null +++ b/cli/tests/testdata/npm/registry/@denotest/check-error/1.0.0/sub_dir/lib.d.ts @@ -0,0 +1 @@ +export const subDir: 1; |