Also make EnumMember have Type meaning
This commit is contained in:
parent
e26d2ae139
commit
f3fe0138a2
|
@ -21,7 +21,6 @@ namespace ts {
|
|||
case SyntaxKind.PropertySignature:
|
||||
case SyntaxKind.PropertyAssignment:
|
||||
case SyntaxKind.ShorthandPropertyAssignment:
|
||||
case SyntaxKind.EnumMember:
|
||||
case SyntaxKind.MethodDeclaration:
|
||||
case SyntaxKind.MethodSignature:
|
||||
case SyntaxKind.Constructor:
|
||||
|
@ -40,6 +39,7 @@ namespace ts {
|
|||
case SyntaxKind.TypeLiteral:
|
||||
return SemanticMeaning.Type;
|
||||
|
||||
case SyntaxKind.EnumMember:
|
||||
case SyntaxKind.ClassDeclaration:
|
||||
return SemanticMeaning.Value | SemanticMeaning.Type;
|
||||
|
||||
|
@ -63,7 +63,7 @@ namespace ts {
|
|||
case SyntaxKind.ImportDeclaration:
|
||||
case SyntaxKind.ExportAssignment:
|
||||
case SyntaxKind.ExportDeclaration:
|
||||
return SemanticMeaning.Value | SemanticMeaning.Type | SemanticMeaning.Namespace;
|
||||
return SemanticMeaning.All;
|
||||
|
||||
// An external module can be a Value
|
||||
case SyntaxKind.SourceFile:
|
||||
|
|
6
tests/cases/fourslash/findAllRefsEnumMember.ts
Normal file
6
tests/cases/fourslash/findAllRefsEnumMember.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
////enum E { [|{| "isWriteAccess": true, "isDefinition": true |}A|], B }
|
||||
////const e: E.[|A|] = E.[|A|];
|
||||
|
||||
verify.singleReferenceGroup("(enum member) E.A = 0");
|
Loading…
Reference in a new issue