File: enumBasics3.types

package info (click to toggle)
node-typescript 5.0.4%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 459,116 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (57 lines) | stat: -rw-r--r-- 739 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
=== tests/cases/compiler/enumBasics3.ts ===
module M {
>M : typeof M

  export namespace N {
>N : typeof N

    export enum E1 {
>E1 : E1

      a = 1,
>a : E1.a
>1 : 1

      b = a.a, // should error
>b : E1.b
>a.a : any
>a : E1.a
>a : any
    }
  }
}

module M {
>M : typeof M

  export namespace N {
>N : typeof N

    export enum E2 {
>E2 : E2

      b = M.N.E1.a,
>b : E2.b
>M.N.E1.a : E1.a
>M.N.E1 : typeof E1
>M.N : typeof N
>M : typeof M
>N : typeof N
>E1 : typeof E1
>a : E1.a

      c = M.N.E1.a.a, // should error
>c : E2.c
>M.N.E1.a.a : any
>M.N.E1.a : E1.a
>M.N.E1 : typeof E1
>M.N : typeof N
>M : typeof M
>N : typeof N
>E1 : typeof E1
>a : E1.a
>a : any
    }
  }
}