mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
In getModifierOccurrences, support additional container kinds (#18947)
This commit is contained in:
1 parent
fe9129b1ab
commit
6617819bf3
2 files changed
+25
-1
No files matched your search
@@ -302,12 +302,15 @@ namespace ts.DocumentHighlights {
|
||||
switch (container.kind) {
|
||||
case SyntaxKind.ModuleBlock:
|
||||
case SyntaxKind.SourceFile:
|
||||
case SyntaxKind.Block:
|
||||
case SyntaxKind.CaseClause:
|
||||
case SyntaxKind.DefaultClause:
|
||||
// Container is either a class declaration or the declaration is a classDeclaration
|
||||
if (modifierFlag & ModifierFlags.Abstract) {
|
||||
nodes = [...(<ClassDeclaration>declaration).members, declaration];
|
||||
}
|
||||
else {
|
||||
nodes = (<Block>container).statements;
|
||||
nodes = (<ModuleBlock | SourceFile | Block | CaseClause | DefaultClause>container).statements;
|
||||
}
|
||||
break;
|
||||
case SyntaxKind.Constructor:
|
||||
|
||||
Reference in new issue
Block a user