fix(npm): handle directory resolution when resolving declaration files (#16706)

Also fixes resolving specifiers like `./something.generated` in
declaration files.

Closes #16695
This commit is contained in:
David Sherret 2022-11-19 10:40:01 -05:00 committed by GitHub
parent 7ab08130a0
commit a57134de38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 88 additions and 12 deletions

View file

@ -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";

View file

@ -0,0 +1 @@
export const otherDir: 2;

View file

@ -0,0 +1 @@
module.exports.otherDir = 2;

View file

@ -0,0 +1 @@
export * from './lib';

View file

@ -0,0 +1 @@
module.exports.subDir = 1;

View file

@ -0,0 +1 @@
export const subDir: 1;