Get symbol at location for class expressions/keywords (#26636)

* getSymbolAtLocation understands class expressions

Previously it did not.

* Update baselines
This commit is contained in:
Nathan Shively-Sanders 2018-08-23 11:27:03 -07:00 committed by GitHub
parent 5433cd8685
commit 6ea2278c7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View file

@ -27269,6 +27269,7 @@ namespace ts {
case SyntaxKind.DefaultKeyword:
case SyntaxKind.FunctionKeyword:
case SyntaxKind.EqualsGreaterThanToken:
case SyntaxKind.ClassKeyword:
return getSymbolOfNode(node.parent);
case SyntaxKind.ImportType:
return isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal) : undefined;

View file

@ -0,0 +1,8 @@
/// <reference path='fourslash.ts'/>
////[1].forEach(cla/*1*/ss {});
////[1].forEach(cla/*2*/ss OK{});
verify.quickInfoAt("1", "(local class) (Anonymous class)");
verify.quickInfoAt("2", "(local class) OK");

View file

@ -8,7 +8,7 @@
//// property: string;
/////*invalid2*/}
////
////cl/*invalid3*/ass bar imple/*invalid4*/ments IFoo {
////class bar imple/*invalid4*/ments IFoo {
//// constructor( /*invalid5*/ ) {
////
//// }