Classify this in parameter position as a keyword

This commit is contained in:
Andy Hanson
2016-06-20 08:27:41 -07:00
parent ba78d1e35c
commit c0eb472b62
2 changed files with 15 additions and 1 deletions

View File

@@ -7533,7 +7533,8 @@ namespace ts {
return;
case SyntaxKind.Parameter:
if ((<ParameterDeclaration>token.parent).name === token) {
return ClassificationType.parameterName;
const isThis = token.kind === SyntaxKind.Identifier && (<Identifier>token).originalKeywordKind === SyntaxKind.ThisKeyword;
return isThis ? ClassificationType.keyword : ClassificationType.parameterName;
}
return;
}