File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -1407,3 +1407,32 @@ type Foo<T> = abstract new () => T;
1407
1407
---
1408
1408
1409
1409
(program (type_alias_declaration (type_identifier) (type_parameters (type_parameter (type_identifier))) (constructor_type (formal_parameters) (type_identifier))))
1410
+
1411
+ =========================
1412
+ Indexed Access Precedence
1413
+ =========================
1414
+
1415
+ // These should generate the same AST aside from the parenthesized_type node
1416
+ type X1 = typeof Y[keyof typeof Z];
1417
+ type X2 = (typeof Y)[keyof typeof Z];
1418
+
1419
+ ---
1420
+
1421
+ (program
1422
+ (comment)
1423
+ (type_alias_declaration
1424
+ (type_identifier)
1425
+ (type_query
1426
+ (identifier))
1427
+ (ERROR
1428
+ (identifier)
1429
+ (identifier)))
1430
+ (type_alias_declaration
1431
+ (type_identifier)
1432
+ (lookup_type
1433
+ (parenthesized_type
1434
+ (type_query
1435
+ (identifier)))
1436
+ (index_type_query
1437
+ (type_query
1438
+ (identifier))))))
You can’t perform that action at this time.
0 commit comments