1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
=== /project/src/app.ts ===
import * as t from "anotherLib"; // Include the lib that recursively includes option as relative module resolution in this directory
>t : typeof t
import { makeSharedOption } from "@shared/lib/app"; // Includes option as module in shared folder but as module in node_modules folder
>makeSharedOption : () => import("/shared/lib/app").SharedOption
=== /shared/node_modules/troublesome-lib/lib/Option.d.ts ===
export class Option {
>Option : Option
someProperty: string;
>someProperty : string
}
=== /shared/lib/app.d.ts ===
import { Option } from "troublesome-lib/lib/Option";
>Option : typeof Option
export class SharedOption extends Option { }
>SharedOption : SharedOption
>Option : Option
export const makeSharedOption: () => SharedOption;
>makeSharedOption : () => SharedOption
=== /project/node_modules/anotherLib/index.d.ts ===
import { Compactable } from "troublesome-lib/lib/Compactable"; // Including this will resolve Option as relative through the imports of compactable
>Compactable : typeof Compactable
=== /project/node_modules/troublesome-lib/lib/Compactable.d.ts ===
import { Option } from './Option';
>Option : typeof Option
export class Compactable {
>Compactable : Compactable
option: Option;
>option : Option
}
=== /project/node_modules/troublesome-lib/lib/Option.d.ts ===
export class Option {
>Option : Option
someProperty: string;
>someProperty : string
}
|