forked from palantir/tslint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.ts.lint
68 lines (58 loc) · 1.43 KB
/
test.ts.lint
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
namespace N {
export type T = number;
export const x: N.T = 0;
~ [N]
export namespace M {
export type U = N.T;
~ [N]
export const y: M.U = 0;
~ [M]
export const z: N.M.U = 0;
~~~ [NM]
export const a = N.x;
~ [N]
export const b = M.y;
~ [M]
export const c = N.M.z;
~~~ [NM]
}
#if typescript >= 3.8.0
export class C {
#p: string;
constructor() {
this.#p = 'C!';
}
getP() {
return this.#p;
}
}
#endif
}
namespace A.B.C1 {
export const D = 7;
}
namespace A.B.C2 {
const copy = A.B.C1.D;
~~~ [Qualifier is unnecessary since 'A.B' is in scope.]
}
import * as B from "./b.test";
declare module "./b.test" {
const x: B.T;
~ [Qualifier is unnecessary since 'B' is in scope.]
}
namespace X {
export type T = number;
namespace Y {
type T = string;
// This qualifier *is* necessary since 'X.T' is shadowed.
const x: X.T = 0;
}
}
enum E {
A,
B = E.A
~ [Qualifier is unnecessary since 'E' is in scope.]
}
[N]: Qualifier is unnecessary since 'N' is in scope.
[M]: Qualifier is unnecessary since 'M' is in scope.
[NM]: Qualifier is unnecessary since 'N.M' is in scope.