Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit91a15dc

Browse files
committed
improve performance
1 parent34323b6 commit91a15dc

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

‎src/services/documentHighlights.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ namespace ts.DocumentHighlights {
395395
pushKeywordIf(keywords,node.getFirstToken(),SyntaxKind.AwaitKeyword);
396396
}
397397
// Do not cross function boundaries.
398-
if(!isFunctionLike(node)){
398+
if(!isFunctionLike(node)&&!isClassLike(node)&&!isInterfaceDeclaration(node)&&!isModuleDeclaration(node)&&!isTypeAliasDeclaration(node)&&!isTypeNode(node)){
399399
forEachChild(node,aggregate);
400400
}
401401
}

‎tests/cases/fourslash/getOccurrencesAsyncAwait.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
////[|async|] function f() {
44
//// [|await|] 100;
55
//// [|a/**/wait|] [|await|] 200;
6+
////class Foo {
7+
//// async memberFunction() {
8+
//// await 1;
9+
////}
10+
////}
611
//// return [|await|] async function () {
712
//// await 300;
813
////}

‎tests/cases/fourslash/getOccurrencesAsyncAwait3.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,5 @@
77
//// await 300;
88
////}
99

10-
verify.rangesAreOccurrences(false);
11-
1210
goTo.marker();
1311
verify.occurrencesAtPositionCount(0);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp