File: declFileTypeAnnotationVisibilityErrorTypeAlias.js

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (124 lines) | stat: -rw-r--r-- 2,502 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
//// [declFileTypeAnnotationVisibilityErrorTypeAlias.ts]
interface Window {
    someMethod();
}

module M {
    type W = Window | string;
    export module N {
        export class Window { }
        export var p: W; // Should report error that W is private
    }
}

module M1 {
    export type W = Window | string;
    export module N {
        export class Window { }
        export var p: W; // No error
    }
}

module M2 {
    class private1 {
    }
    class public1 {
    }
    module m3 {
        export class public1 {
        }
    }

    type t1 = private1;
    export type t2 = private1; // error

    type t11 = public1;
    export type t12 = public1;

    type t111 = m3.public1;
    export type t112 = m3.public1; // error
}


//// [declFileTypeAnnotationVisibilityErrorTypeAlias.js]
var M;
(function (M) {
    var N;
    (function (N) {
        var Window = /** @class */ (function () {
            function Window() {
            }
            return Window;
        }());
        N.Window = Window;
    })(N = M.N || (M.N = {}));
})(M || (M = {}));
var M1;
(function (M1) {
    var N;
    (function (N) {
        var Window = /** @class */ (function () {
            function Window() {
            }
            return Window;
        }());
        N.Window = Window;
    })(N = M1.N || (M1.N = {}));
})(M1 || (M1 = {}));
var M2;
(function (M2) {
    var private1 = /** @class */ (function () {
        function private1() {
        }
        return private1;
    }());
    var public1 = /** @class */ (function () {
        function public1() {
        }
        return public1;
    }());
    var m3;
    (function (m3) {
        var public1 = /** @class */ (function () {
            function public1() {
            }
            return public1;
        }());
        m3.public1 = public1;
    })(m3 || (m3 = {}));
})(M2 || (M2 = {}));


//// [declFileTypeAnnotationVisibilityErrorTypeAlias.d.ts]
interface Window {
    someMethod(): any;
}
declare module M {
    type W = Window | string;
    module N {
        class Window {
        }
        var p: W;
    }
}
declare module M1 {
    type W = Window | string;
    module N {
        class Window {
        }
        var p: W;
    }
}
declare module M2 {
    class private1 {
    }
    class public1 {
    }
    module m3 {
        class public1 {
        }
    }
    type t2 = private1;
    type t12 = public1;
    type t112 = m3.public1;
}