File: isolatedModulesGlobalNamespacesAndEnums.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 (74 lines) | stat: -rw-r--r-- 1,118 bytes parent folder | download
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
=== tests/cases/compiler/script-namespaces.ts ===
namespace Instantiated {
>Instantiated : typeof Instantiated

    export const x = 1;
>x : 1
>1 : 1
}
namespace Uninstantiated {
    export type T = number;
>T : number
}
declare namespace Ambient {
>Ambient : typeof Ambient

    export const x: number;
>x : number
}

=== tests/cases/compiler/module-namespaces.ts ===
export namespace Instantiated {
>Instantiated : typeof Instantiated

    export const x = 1;
>x : 1
>1 : 1
}

=== tests/cases/compiler/enum1.ts ===
enum Enum { A, B, C }
>Enum : Enum
>A : Enum.A
>B : Enum.B
>C : Enum.C

declare enum Enum { X = 1_000_000 }
>Enum : Enum
>X : Enum.X
>1_000_000 : 1000000

const d = 'd';
>d : "d"
>'d' : "d"

=== tests/cases/compiler/enum2.ts ===
enum Enum {
>Enum : Enum

    D = d,
>D : Enum.D
>d : "d"

    E = A, // error
>E : Enum.A
>A : Enum.A

    Y = X, // error
>Y : Enum.X
>X : Enum.X

    Z = Enum.A
>Z : Enum.A
>Enum.A : Enum.A
>Enum : typeof Enum
>A : Enum.A
}

declare enum Enum {
>Enum : Enum

    F = A
>F : Enum.A
>A : Enum.A
}