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
|
=== /user.ts ===
// Error, can't re-export something that's only a type.
export { T } from "./exportT";
>T : Symbol(T, Decl(user.ts, 1, 8))
export import T2 = require("./exportEqualsT");
>T2 : Symbol(T2, Decl(user.ts, 1, 30))
// OK, has a value side
export { C } from "./exportValue";
>C : Symbol(C, Decl(user.ts, 5, 8))
// OK, even though the namespace it exports is only types.
import * as NS from "./exportT";
>NS : Symbol(NS, Decl(user.ts, 8, 6))
export { NS };
>NS : Symbol(NS, Decl(user.ts, 9, 8))
// OK, syntactically clear that a type is being re-exported.
export type T3 = T;
>T3 : Symbol(T3, Decl(user.ts, 9, 14))
>T : Symbol(T, Decl(user.ts, 15, 8))
// Error, not clear (to an isolated module) whether `T4` is a type.
import { T } from "./exportT";
>T : Symbol(T, Decl(user.ts, 15, 8))
export { T as T4 };
>T : Symbol(T, Decl(user.ts, 15, 8))
>T4 : Symbol(T4, Decl(user.ts, 16, 8))
=== /exportT.ts ===
export type T = number;
>T : Symbol(T, Decl(exportT.ts, 0, 0))
=== /exportValue.ts ===
export class C {}
>C : Symbol(C, Decl(exportValue.ts, 0, 0))
=== /exportEqualsT.ts ===
declare type T = number;
>T : Symbol(T, Decl(exportEqualsT.ts, 0, 0))
export = T;
>T : Symbol(T, Decl(exportEqualsT.ts, 0, 0))
|