mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 04:43:37 -05:00
Accept baselines.
This commit is contained in:
@@ -8134,12 +8134,12 @@ namespace ts {
|
||||
if (indexArgumentExpression.kind === SyntaxKind.StringLiteral || indexArgumentExpression.kind === SyntaxKind.NumericLiteral) {
|
||||
return (<LiteralExpression>indexArgumentExpression).text;
|
||||
}
|
||||
if (indexArgumentExpression.kind === SyntaxKind.ElementAccessExpression || indexArgumentExpression.kind === SyntaxKind.PropertyAccessExpression) {
|
||||
let value = getConstantValue(<ElementAccessExpression | PropertyAccessExpression>indexArgumentExpression);
|
||||
if (value !== undefined) {
|
||||
return value.toString();
|
||||
}
|
||||
}
|
||||
if (indexArgumentExpression.kind === SyntaxKind.ElementAccessExpression || indexArgumentExpression.kind === SyntaxKind.PropertyAccessExpression) {
|
||||
let value = getConstantValue(<ElementAccessExpression | PropertyAccessExpression>indexArgumentExpression);
|
||||
if (value !== undefined) {
|
||||
return value.toString();
|
||||
}
|
||||
}
|
||||
if (checkThatExpressionIsProperSymbolReference(indexArgumentExpression, indexArgumentType, /*reportError*/ false)) {
|
||||
let rightHandSideName = (<Identifier>(<PropertyAccessExpression>indexArgumentExpression).name).text;
|
||||
return getPropertyNameForKnownSymbolName(rightHandSideName);
|
||||
|
||||
Reference in New Issue
Block a user