Accept baselines.

This commit is contained in:
jbondc
2015-10-08 08:21:28 -04:00
parent 8960f523ea
commit 82eb992dc4
4 changed files with 215 additions and 6 deletions

View File

@@ -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);