mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
//// [tests/cases/conformance/externalModules/exportAssignNonIdentifier.ts] ////
|
|
|
|
=== foo1.ts ===
|
|
var x = 10;
|
|
>x : Symbol(x, Decl(foo1.ts, 0, 3))
|
|
|
|
export = typeof x; // Ok
|
|
>x : Symbol(x, Decl(foo1.ts, 0, 3))
|
|
|
|
=== foo2.ts ===
|
|
|
|
export = "sausages"; // Ok
|
|
|
|
=== foo3.ts ===
|
|
export = class Foo3 {}; // Error, not an expression
|
|
>Foo3 : Symbol(Foo3, Decl(foo3.ts, 0, 8))
|
|
|
|
=== foo4.ts ===
|
|
|
|
export = true; // Ok
|
|
|
|
=== foo5.ts ===
|
|
export = undefined; // Valid. undefined is an identifier in JavaScript/TypeScript
|
|
>undefined : Symbol(undefined)
|
|
|
|
=== foo6.ts ===
|
|
|
|
export = void; // Error, void operator requires an argument
|
|
|
|
=== foo7.ts ===
|
|
export = Date || String; // Ok
|
|
>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
|
|
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more)
|
|
|
|
=== foo8.ts ===
|
|
|
|
export = null; // Ok
|
|
|
|
|