Various fixes

This commit is contained in:
Ryan Cavanaugh 2017-08-10 13:13:18 -07:00
parent 12403d9f70
commit 1ad411e13e
2 changed files with 6 additions and 6 deletions

View File

@ -224,7 +224,7 @@ namespace ts {
getSuggestionForNonexistentSymbol: (location, name, meaning) => unescapeLeadingUnderscores(getSuggestionForNonexistentSymbol(location, escapeLeadingUnderscores(name), meaning)),
getBaseConstraintOfType,
resolveName(name, location, meaning) {
return resolveName(location, name as __String, meaning, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined);
return resolveName(location, escapeLeadingUnderscores(name), meaning, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined);
},
getJsxNamespace: () => unescapeLeadingUnderscores(getJsxNamespace()),
};

View File

@ -693,7 +693,7 @@ namespace ts {
// At this point, node is either a qualified name or an identifier
Debug.assert(node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.QualifiedName || node.kind === SyntaxKind.PropertyAccessExpression,
"'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");
// falls through
// falls through
case SyntaxKind.QualifiedName:
case SyntaxKind.PropertyAccessExpression:
case SyntaxKind.ThisKeyword:
@ -968,7 +968,7 @@ namespace ts {
if (!includeArrowFunctions) {
continue;
}
// falls through
// falls through
case SyntaxKind.FunctionDeclaration:
case SyntaxKind.FunctionExpression:
case SyntaxKind.ModuleDeclaration:
@ -1027,7 +1027,7 @@ namespace ts {
if (!stopOnFunctions) {
continue;
}
// falls through
// falls through
case SyntaxKind.PropertyDeclaration:
case SyntaxKind.PropertySignature:
case SyntaxKind.MethodDeclaration:
@ -1211,7 +1211,7 @@ namespace ts {
if (node.parent.kind === SyntaxKind.TypeQuery || isJSXTagName(node)) {
return true;
}
// falls through
// falls through
case SyntaxKind.NumericLiteral:
case SyntaxKind.StringLiteral:
case SyntaxKind.ThisKeyword:
@ -1907,7 +1907,7 @@ namespace ts {
if (node.asteriskToken) {
flags |= FunctionFlags.Generator;
}
// falls through
// falls through
case SyntaxKind.ArrowFunction:
if (hasModifier(node, ModifierFlags.Async)) {
flags |= FunctionFlags.Async;