In bundle declaration emit, refuse to rewrite nonrelative references to files outside the common source directory (#42306)

This commit is contained in:
Wesley Wigham
2021-01-25 11:16:59 -08:00
committed by GitHub
parent 1b57a0395e
commit d7d8f33def
5 changed files with 108 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
// @declaration: true
// @emitDeclarationOnly: true
// @outFile: dist/index.d.ts
// @currentDirectory: /a
// @noImplicitReferences: true
// @filename: /b/index.ts
export * from "./src/"
// @filename: /b/src/index.ts
export class B {}
// @filename: /a/src/index.ts
import { B } from "b";
export default function () {
return new B();
}
// @filename: /a/index.ts
export * from "./src/"
// @link: /b -> /a/node_modules/b