mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Merge pull request #27849 from Microsoft/unionWithIndexedLiteral
Use string/number signature to get contextual type
This commit is contained in:
@@ -16714,6 +16714,8 @@ namespace ts {
|
||||
return restType;
|
||||
}
|
||||
}
|
||||
return isNumericLiteralName(name) && getIndexTypeOfContextualType(type, IndexKind.Number) ||
|
||||
getIndexTypeOfContextualType(type, IndexKind.String);
|
||||
}
|
||||
return undefined;
|
||||
}, /*noReductions*/ true);
|
||||
|
||||
Reference in New Issue
Block a user