File: enumBasics3.types

package info (click to toggle)
node-typescript 4.8.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 523,068 kB
  • sloc: javascript: 1,735,777; makefile: 7; sh: 1
file content (57 lines) | stat: -rw-r--r-- 721 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
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
>1 : 1

      b = a.a, // should error
>b : E1
>a.a : any
>a : E1
>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
>M.N.E1.a : E1
>M.N.E1 : typeof E1
>M.N : typeof N
>M : typeof M
>N : typeof N
>E1 : typeof E1
>a : E1

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