File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -2558,10 +2558,8 @@ namespace ts {
2558
2558
}
2559
2559
2560
2560
function createTypeNodeFromObjectType(type: ObjectType): TypeNode {
2561
- if (type.objectFlags & ObjectFlags.Mapped) {
2562
- if (getConstraintTypeFromMappedType(<MappedType>type).flags & (TypeFlags.TypeParameter | TypeFlags.Index)) {
2563
- return createMappedTypeNodeFromType(<MappedType>type);
2564
- }
2561
+ if (isGenericMappedType(type)) {
2562
+ return createMappedTypeNodeFromType(<MappedType>type);
2565
2563
}
2566
2564
2567
2565
const resolved = resolveStructuredTypeMembers(type);
@@ -3464,11 +3462,9 @@ namespace ts {
3464
3462
}
3465
3463
3466
3464
function writeLiteralType(type: ObjectType, flags: TypeFormatFlags) {
3467
- if (type.objectFlags & ObjectFlags.Mapped) {
3468
- if (getConstraintTypeFromMappedType(<MappedType>type).flags & (TypeFlags.TypeParameter | TypeFlags.Index)) {
3469
- writeMappedType(<MappedType>type);
3470
- return;
3471
- }
3465
+ if (isGenericMappedType(type)) {
3466
+ writeMappedType(<MappedType>type);
3467
+ return;
3472
3468
}
3473
3469
3474
3470
const resolved = resolveStructuredTypeMembers(type);
@@ -18641,6 +18637,8 @@ namespace ts {
18641
18637
}
18642
18638
18643
18639
function checkIndexedAccessType(node: IndexedAccessTypeNode) {
18640
+ checkSourceElement(node.objectType);
18641
+ checkSourceElement(node.indexType);
18644
18642
checkIndexedAccessIndexType(getTypeFromIndexedAccessTypeNode(node), node);
18645
18643
}
18646
18644
You can’t perform that action at this time.
0 commit comments