mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-29 16:29:19 -05:00
fix(37150): ignore private fields in string index type checking (#37183)
This commit is contained in:
@@ -32950,6 +32950,10 @@ namespace ts {
|
||||
const propDeclaration = prop.valueDeclaration;
|
||||
const name = propDeclaration && getNameOfDeclaration(propDeclaration);
|
||||
|
||||
if (name && isPrivateIdentifier(name)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// index is numeric and property name is not valid numeric literal
|
||||
if (indexKind === IndexKind.Number && !(name ? isNumericName(name) : isNumericLiteralName(prop.escapedName))) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user