Skip to content

Commit

Permalink
getLiteralTypeFromProperty-check privateIdentifier
Browse files Browse the repository at this point in the history
  • Loading branch information
mheiber committed Jul 15, 2019
1 parent 99d11db commit bd1155c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/compiler/checker.ts
Expand Up @@ -10005,6 +10005,9 @@ namespace ts {
}
else {
const name = prop.valueDeclaration && getNameOfDeclaration(prop.valueDeclaration) as PropertyName;
if (isPrivateIdentifier(name)) {
return neverType;
}
type = name && getLiteralTypeFromPropertyName(name) || getLiteralType(symbolName(prop));
}
}
Expand Down

0 comments on commit bd1155c

Please sign in to comment.