File: exportAssignNonIdentifier.types

package info (click to toggle)
node-typescript 5.0.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 459,140 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (42 lines) | stat: -rw-r--r-- 1,200 bytes parent folder | download | duplicates (2)
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
=== 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

=== 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