|
1 | 1 | const NormalIdentifierSnapshot = {
|
2 |
| - Issue50: { |
| 2 | + TypeNameSame1: { |
3 | 3 | type: 'Program',
|
4 | 4 | start: 0,
|
5 | 5 | end: 25,
|
@@ -146,6 +146,210 @@ const NormalIdentifierSnapshot = {
|
146 | 146 | ],
|
147 | 147 | sourceType: 'module'
|
148 | 148 | },
|
| 149 | + TypeNameSame2: { |
| 150 | + type: 'Program', |
| 151 | + start: 0, |
| 152 | + end: 25, |
| 153 | + loc: { start: { line: 1, column: 0, index: 0 }, end: { line: 2, column: 8, index: 25 } }, |
| 154 | + body: [ |
| 155 | + { |
| 156 | + type: 'TSTypeAliasDeclaration', |
| 157 | + start: 0, |
| 158 | + end: 16, |
| 159 | + loc: { start: { line: 1, column: 0, index: 0 }, end: { line: 1, column: 16, index: 16 } }, |
| 160 | + id: { |
| 161 | + type: 'Identifier', |
| 162 | + start: 5, |
| 163 | + end: 8, |
| 164 | + loc: { start: { line: 1, column: 5, index: 5 }, end: { line: 1, column: 8, index: 8 } }, |
| 165 | + name: 'abc' |
| 166 | + }, |
| 167 | + typeAnnotation: { |
| 168 | + type: 'TSLiteralType', |
| 169 | + start: 11, |
| 170 | + end: 15, |
| 171 | + loc: { |
| 172 | + start: { line: 1, column: 11, index: 11 }, |
| 173 | + end: { line: 1, column: 15, index: 15 } |
| 174 | + }, |
| 175 | + literal: { |
| 176 | + type: 'Literal', |
| 177 | + start: 11, |
| 178 | + end: 15, |
| 179 | + loc: { |
| 180 | + start: { line: 1, column: 11, index: 11 }, |
| 181 | + end: { line: 1, column: 15, index: 15 } |
| 182 | + }, |
| 183 | + value: 1234, |
| 184 | + raw: '1234' |
| 185 | + } |
| 186 | + } |
| 187 | + }, |
| 188 | + { |
| 189 | + type: 'VariableDeclaration', |
| 190 | + start: 17, |
| 191 | + end: 25, |
| 192 | + loc: { start: { line: 2, column: 0, index: 17 }, end: { line: 2, column: 8, index: 25 } }, |
| 193 | + declarations: [ |
| 194 | + { |
| 195 | + type: 'VariableDeclarator', |
| 196 | + start: 21, |
| 197 | + end: 24, |
| 198 | + loc: { |
| 199 | + start: { line: 2, column: 4, index: 21 }, |
| 200 | + end: { line: 2, column: 7, index: 24 } |
| 201 | + }, |
| 202 | + id: { |
| 203 | + type: 'Identifier', |
| 204 | + start: 21, |
| 205 | + end: 24, |
| 206 | + loc: { |
| 207 | + start: { line: 2, column: 4, index: 21 }, |
| 208 | + end: { line: 2, column: 7, index: 24 } |
| 209 | + }, |
| 210 | + name: 'abc' |
| 211 | + }, |
| 212 | + init: null |
| 213 | + } |
| 214 | + ], |
| 215 | + kind: 'let' |
| 216 | + } |
| 217 | + ], |
| 218 | + sourceType: 'module' |
| 219 | + }, |
| 220 | + TypeNameSame3: { |
| 221 | + type: 'Program', |
| 222 | + start: 0, |
| 223 | + end: 34, |
| 224 | + loc: { start: { line: 1, column: 0, index: 0 }, end: { line: 2, column: 17, index: 34 } }, |
| 225 | + body: [ |
| 226 | + { |
| 227 | + type: 'TSTypeAliasDeclaration', |
| 228 | + start: 0, |
| 229 | + end: 16, |
| 230 | + loc: { start: { line: 1, column: 0, index: 0 }, end: { line: 1, column: 16, index: 16 } }, |
| 231 | + id: { |
| 232 | + type: 'Identifier', |
| 233 | + start: 5, |
| 234 | + end: 8, |
| 235 | + loc: { start: { line: 1, column: 5, index: 5 }, end: { line: 1, column: 8, index: 8 } }, |
| 236 | + name: 'abc' |
| 237 | + }, |
| 238 | + typeAnnotation: { |
| 239 | + type: 'TSLiteralType', |
| 240 | + start: 11, |
| 241 | + end: 15, |
| 242 | + loc: { |
| 243 | + start: { line: 1, column: 11, index: 11 }, |
| 244 | + end: { line: 1, column: 15, index: 15 } |
| 245 | + }, |
| 246 | + literal: { |
| 247 | + type: 'Literal', |
| 248 | + start: 11, |
| 249 | + end: 15, |
| 250 | + loc: { |
| 251 | + start: { line: 1, column: 11, index: 11 }, |
| 252 | + end: { line: 1, column: 15, index: 15 } |
| 253 | + }, |
| 254 | + value: 1234, |
| 255 | + raw: '1234' |
| 256 | + } |
| 257 | + } |
| 258 | + }, |
| 259 | + { |
| 260 | + type: 'FunctionDeclaration', |
| 261 | + start: 17, |
| 262 | + end: 34, |
| 263 | + loc: { start: { line: 2, column: 0, index: 17 }, end: { line: 2, column: 17, index: 34 } }, |
| 264 | + id: { |
| 265 | + type: 'Identifier', |
| 266 | + start: 26, |
| 267 | + end: 29, |
| 268 | + loc: { |
| 269 | + start: { line: 2, column: 9, index: 26 }, |
| 270 | + end: { line: 2, column: 12, index: 29 } |
| 271 | + }, |
| 272 | + name: 'abc' |
| 273 | + }, |
| 274 | + expression: false, |
| 275 | + generator: false, |
| 276 | + async: false, |
| 277 | + params: [], |
| 278 | + body: { |
| 279 | + type: 'BlockStatement', |
| 280 | + start: 32, |
| 281 | + end: 34, |
| 282 | + loc: { |
| 283 | + start: { line: 2, column: 15, index: 32 }, |
| 284 | + end: { line: 2, column: 17, index: 34 } |
| 285 | + }, |
| 286 | + body: [] |
| 287 | + } |
| 288 | + } |
| 289 | + ], |
| 290 | + sourceType: 'module' |
| 291 | + }, |
| 292 | + InterfaceMerging: { |
| 293 | + type: 'Program', |
| 294 | + start: 0, |
| 295 | + end: 33, |
| 296 | + loc: { start: { line: 1, column: 0, index: 0 }, end: { line: 2, column: 16, index: 33 } }, |
| 297 | + body: [ |
| 298 | + { |
| 299 | + type: 'TSInterfaceDeclaration', |
| 300 | + start: 0, |
| 301 | + end: 16, |
| 302 | + loc: { start: { line: 1, column: 0, index: 0 }, end: { line: 1, column: 16, index: 16 } }, |
| 303 | + id: { |
| 304 | + type: 'Identifier', |
| 305 | + start: 10, |
| 306 | + end: 13, |
| 307 | + loc: { |
| 308 | + start: { line: 1, column: 10, index: 10 }, |
| 309 | + end: { line: 1, column: 13, index: 13 } |
| 310 | + }, |
| 311 | + name: 'abc' |
| 312 | + }, |
| 313 | + body: { |
| 314 | + type: 'TSInterfaceBody', |
| 315 | + start: 14, |
| 316 | + end: 16, |
| 317 | + loc: { |
| 318 | + start: { line: 1, column: 14, index: 14 }, |
| 319 | + end: { line: 1, column: 16, index: 16 } |
| 320 | + }, |
| 321 | + body: [] |
| 322 | + } |
| 323 | + }, |
| 324 | + { |
| 325 | + type: 'TSInterfaceDeclaration', |
| 326 | + start: 17, |
| 327 | + end: 33, |
| 328 | + loc: { start: { line: 2, column: 0, index: 17 }, end: { line: 2, column: 16, index: 33 } }, |
| 329 | + id: { |
| 330 | + type: 'Identifier', |
| 331 | + start: 27, |
| 332 | + end: 30, |
| 333 | + loc: { |
| 334 | + start: { line: 2, column: 10, index: 27 }, |
| 335 | + end: { line: 2, column: 13, index: 30 } |
| 336 | + }, |
| 337 | + name: 'abc' |
| 338 | + }, |
| 339 | + body: { |
| 340 | + type: 'TSInterfaceBody', |
| 341 | + start: 31, |
| 342 | + end: 33, |
| 343 | + loc: { |
| 344 | + start: { line: 2, column: 14, index: 31 }, |
| 345 | + end: { line: 2, column: 16, index: 33 } |
| 346 | + }, |
| 347 | + body: [] |
| 348 | + } |
| 349 | + } |
| 350 | + ], |
| 351 | + sourceType: 'module' |
| 352 | + }, |
149 | 353 | ExportIdentifierAs: {
|
150 | 354 | type: 'Program',
|
151 | 355 | start: 0,
|
|
0 commit comments