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
|
=== /decl.d.ts ===
declare class CJSy {}
>CJSy : CJSy
export = CJSy;
>CJSy : CJSy
=== /ambient.d.ts ===
declare module "ambient" {
>"ambient" : typeof import("ambient")
const _export: number;
>_export : number
export = _export;
>_export : number
}
=== /types.ts ===
interface Typey {}
export type { Typey };
>Typey : Typey
=== /main.ts ===
import CJSy = require("./decl"); // error
>CJSy : typeof CJSy
import type CJSy2 = require("./decl"); // ok I guess?
>CJSy2 : typeof CJSy
import CJSy3 from "./decl"; // ok in esModuleInterop
>CJSy3 : typeof CJSy
import * as types from "./types"; // ok
>types : typeof types
CJSy;
>CJSy : typeof CJSy
=== /ns.ts ===
export namespace ns {
>ns : typeof ns
export enum A {}
>A : A
}
|