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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
=== /src/a.ts ===
import { a } from "a";
>a : (x: import("/node_modules/a/node_modules/x/index").default) => void
import { b } from "b";
>b : import("/node_modules/a/node_modules/x/index").default
import { c } from "c";
>c : import("/node_modules/c/node_modules/x/index").default
a(b); // Works
>a(b) : void
>a : (x: import("/node_modules/a/node_modules/x/index").default) => void
>b : import("/node_modules/a/node_modules/x/index").default
a(c); // Error, these are from different versions of the library.
>a(c) : void
>a : (x: import("/node_modules/a/node_modules/x/index").default) => void
>c : import("/node_modules/c/node_modules/x/index").default
=== /node_modules/a/index.d.ts ===
import X from "x";
>X : typeof X
export function a(x: X): void;
>a : (x: X) => void
>x : X
=== /node_modules/a/node_modules/x/index.d.ts ===
export default class X {
>X : X
private x: number;
>x : number
}
=== /node_modules/b/index.d.ts ===
import X from "x";
>X : typeof X
export const b: X;
>b : X
=== /node_modules/b/node_modules/x/index.d.ts ===
content not parsed
>X : X
>x : number
=== /node_modules/c/index.d.ts ===
import X from "x";
>X : typeof X
export const c: X;
>c : X
=== /node_modules/c/node_modules/x/index.d.ts ===
export default class X {
>X : X
private x: number;
>x : number
}
|