1
1
// === goToDefinition ===
2
+ // === /tests/cases/fourslash/definitions.ts ===
3
+ // export class Base {
4
+ // [|{| defId: 1 |}constructor(protected readonly cArg: string) {}|]
5
+ // }
6
+ //
7
+ // <|export class [|{| defId: 0 |}Derived|] extends Base {
8
+ // readonly email = this.cArg.getByLabel('Email')
9
+ // readonly password = this.cArg.getByLabel('Password')
10
+ // }|>
11
+
2
12
// === /tests/cases/fourslash/main.ts ===
3
- // <| import { [| Derived|] } from './base'|>
4
- // const derived = new /*GOTO DEF*/Derived(cArg)
13
+ // import { Derived } from './definitions'
14
+ // const derived = new /*GOTO DEF*/[| Derived|] (cArg)
5
15
6
16
// === Details ===
7
17
[
8
18
{
9
- "kind" : " alias" ,
19
+ "defId" : 0 ,
20
+ "kind" : " class" ,
10
21
"name" : " Derived" ,
11
- "containerName" : " " ,
12
- "isLocal" : true ,
22
+ "containerName" : " \" /tests/cases/fourslash/definitions \" " ,
23
+ "isLocal" : false ,
13
24
"isAmbient" : false ,
14
- "unverified" : false ,
15
- "failedAliasResolution" : true
25
+ "unverified" : false
26
+ },
27
+ {
28
+ "defId" : 1 ,
29
+ "kind" : " constructor" ,
30
+ "name" : " __constructor" ,
31
+ "containerName" : " Base" ,
32
+ "isLocal" : false ,
33
+ "isAmbient" : false ,
34
+ "unverified" : false
16
35
}
17
36
]
18
37
19
38
20
39
21
40
// === goToDefinition ===
22
41
// === /tests/cases/fourslash/defInSameFile.ts ===
23
- // import { Base } from './base '
24
- // <|class [|SameFile|] extends Base {
42
+ // import { Base } from './definitions '
43
+ // <|class [|{| defId: 0 |} SameFile|] extends Base {
25
44
// readonly name: string = 'SameFile'
26
45
// }|>
27
46
// const SameFile = new /*GOTO DEF*/SameFile(cArg)
28
47
// const wrapper = new Base(cArg)
29
48
49
+ // === /tests/cases/fourslash/definitions.ts ===
50
+ // export class Base {
51
+ // [|{| defId: 1 |}constructor(protected readonly cArg: string) {}|]
52
+ // }
53
+ //
54
+ // export class Derived extends Base {
55
+ // --- (line: 6) skipped ---
56
+
30
57
// === Details ===
31
58
[
32
59
{
60
+ "defId" : 0 ,
33
61
"kind" : " class" ,
34
62
"name" : " SameFile" ,
35
63
"containerName" : " " ,
36
64
"isLocal" : true ,
37
65
"isAmbient" : false ,
38
66
"unverified" : false ,
39
67
"failedAliasResolution" : false
68
+ },
69
+ {
70
+ "defId" : 1 ,
71
+ "kind" : " constructor" ,
72
+ "name" : " __constructor" ,
73
+ "containerName" : " Base" ,
74
+ "isLocal" : false ,
75
+ "isAmbient" : false ,
76
+ "unverified" : false ,
77
+ "failedAliasResolution" : false
40
78
}
41
79
]
42
80
43
81
44
82
45
83
// === goToDefinition ===
46
84
// === /tests/cases/fourslash/hasConstructor.ts ===
47
- // import { Base } from './base '
85
+ // import { Base } from './definitions '
48
86
// <|class [|{| defId: 0 |}HasConstructor|] extends Base {
49
87
// [|{| defId: 1 |}constructor() {}|]
50
88
// readonly name: string = '';
78
116
79
117
80
118
// === goToDefinition ===
119
+ // === /tests/cases/fourslash/definitions.ts ===
120
+ // <|export class [|{| defId: 0 |}Base|] {
121
+ // [|{| defId: 1 |}constructor(protected readonly cArg: string) {}|]
122
+ // }|>
123
+ //
124
+ // export class Derived extends Base {
125
+ // readonly email = this.cArg.getByLabel('Email')
126
+ // readonly password = this.cArg.getByLabel('Password')
127
+ // }
128
+
81
129
// === /tests/cases/fourslash/defInSameFile.ts ===
82
- // <| import { [| Base|] } from './base'|>
130
+ // import { Base } from './definitions'
83
131
// class SameFile extends Base {
84
132
// readonly name: string = 'SameFile'
85
133
// }
86
134
// const SameFile = new SameFile(cArg)
87
- // const wrapper = new /*GOTO DEF*/Base(cArg)
135
+ // const wrapper = new /*GOTO DEF*/[| Base|] (cArg)
88
136
89
137
// === Details ===
90
138
[
91
139
{
92
- "kind" : " alias" ,
140
+ "defId" : 0 ,
141
+ "kind" : " class" ,
93
142
"name" : " Base" ,
94
- "containerName" : " " ,
95
- "isLocal" : true ,
143
+ "containerName" : " \" /tests/cases/fourslash/definitions \" " ,
144
+ "isLocal" : false ,
96
145
"isAmbient" : false ,
97
- "unverified" : false ,
98
- "failedAliasResolution" : true
146
+ "unverified" : false
147
+ },
148
+ {
149
+ "defId" : 1 ,
150
+ "kind" : " constructor" ,
151
+ "name" : " __constructor" ,
152
+ "containerName" : " Base" ,
153
+ "isLocal" : false ,
154
+ "isAmbient" : false ,
155
+ "unverified" : false
99
156
}
100
157
]
0 commit comments