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
|
=== tests/cases/conformance/externalModules/foo1.ts ===
var x = 10;
>x : number
>10 : 10
export = typeof x; // Ok
>typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
>x : number
=== tests/cases/conformance/externalModules/foo2.ts ===
export = "sausages"; // Ok
No type information for this code.
No type information for this code.=== tests/cases/conformance/externalModules/foo3.ts ===
export = class Foo3 {}; // Error, not an expression
>class Foo3 {} : typeof Foo3
>Foo3 : typeof Foo3
=== tests/cases/conformance/externalModules/foo4.ts ===
export = true; // Ok
>true : true
=== tests/cases/conformance/externalModules/foo5.ts ===
export = undefined; // Valid. undefined is an identifier in JavaScript/TypeScript
>undefined : undefined
=== tests/cases/conformance/externalModules/foo6.ts ===
export = void; // Error, void operator requires an argument
>void : undefined
> : any
=== tests/cases/conformance/externalModules/foo7.ts ===
export = Date || String; // Ok
>Date || String : DateConstructor | StringConstructor
>Date : DateConstructor
>String : StringConstructor
=== tests/cases/conformance/externalModules/foo8.ts ===
export = null; // Ok
>null : null
|