* For duplicate source files of the same package, make one redirect to the other * Add reuseProgramStructure tests * Copy `sourceFileToPackageId` and `isSourceFileTargetOfRedirect` only if we completely reuse old structure * Use fallthrough instead of early exit from loop * Use a set to efficiently detect duplicate package names * Move map setting outside of createRedirectSourceFile * Correctly handle seenPackageNames set * sourceFileToPackageId -> sourceFileToPackageName * Renames * Respond to PR comments * Fix bug where `oldSourceFile !== newSourceFile` because oldSourceFile was a redirect * Clean up redirectInfo * Respond to PR comments
24 lines
591 B
TypeScript
24 lines
591 B
TypeScript
// @noImplicitReferences: true
|
|
|
|
// @Filename: /node_modules/a/index.d.ts
|
|
export { x } from "x";
|
|
|
|
// @Filename: /node_modules/a/node_modules/x/index.d.ts
|
|
export const x = 1 + 1;
|
|
|
|
// @Filename: /node_modules/a/node_modules/x/package.json
|
|
{ "name": "x", "version": "1.2.3" }
|
|
|
|
// @Filename: /node_modules/b/index.d.ts
|
|
export { x } from "x";
|
|
|
|
// @Filename: /node_modules/b/node_modules/x/index.d.ts
|
|
content not parsed
|
|
|
|
// @Filename: /node_modules/b/node_modules/x/package.json
|
|
{ "name": "x", "version": "1.2.3" }
|
|
|
|
// @Filename: /src/a.ts
|
|
import { x as xa } from "a";
|
|
import { x as xb } from "b";
|