Skip to content

Commit f3fe013

Browse files
author
Andy Hanson
committed
Also make EnumMember have Type meaning
1 parent e26d2ae commit f3fe013

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/services/utilities.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ namespace ts {
2121
case SyntaxKind.PropertySignature:
2222
case SyntaxKind.PropertyAssignment:
2323
case SyntaxKind.ShorthandPropertyAssignment:
24-
case SyntaxKind.EnumMember:
2524
case SyntaxKind.MethodDeclaration:
2625
case SyntaxKind.MethodSignature:
2726
case SyntaxKind.Constructor:
@@ -40,6 +39,7 @@ namespace ts {
4039
case SyntaxKind.TypeLiteral:
4140
return SemanticMeaning.Type;
4241

42+
case SyntaxKind.EnumMember:
4343
case SyntaxKind.ClassDeclaration:
4444
return SemanticMeaning.Value | SemanticMeaning.Type;
4545

@@ -63,7 +63,7 @@ namespace ts {
6363
case SyntaxKind.ImportDeclaration:
6464
case SyntaxKind.ExportAssignment:
6565
case SyntaxKind.ExportDeclaration:
66-
return SemanticMeaning.Value | SemanticMeaning.Type | SemanticMeaning.Namespace;
66+
return SemanticMeaning.All;
6767

6868
// An external module can be a Value
6969
case SyntaxKind.SourceFile:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/// <reference path="fourslash.ts"/>
2+
3+
////enum E { [|{| "isWriteAccess": true, "isDefinition": true |}A|], B }
4+
////const e: E.[|A|] = E.[|A|];
5+
6+
verify.singleReferenceGroup("(enum member) E.A = 0");

0 commit comments

Comments
 (0)