mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-22 02:35:48 -05:00
improve performance
This commit is contained in:
@@ -395,7 +395,7 @@ namespace ts.DocumentHighlights {
|
||||
pushKeywordIf(keywords, node.getFirstToken(), SyntaxKind.AwaitKeyword);
|
||||
}
|
||||
// Do not cross function boundaries.
|
||||
if (!isFunctionLike(node)) {
|
||||
if (!isFunctionLike(node) && !isClassLike(node) && !isInterfaceDeclaration(node) && !isModuleDeclaration(node) && !isTypeAliasDeclaration(node) && !isTypeNode(node)) {
|
||||
forEachChild(node, aggregate);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
////[|async|] function f() {
|
||||
//// [|await|] 100;
|
||||
//// [|a/**/wait|] [|await|] 200;
|
||||
////class Foo {
|
||||
//// async memberFunction() {
|
||||
//// await 1;
|
||||
//// }
|
||||
////}
|
||||
//// return [|await|] async function () {
|
||||
//// await 300;
|
||||
//// }
|
||||
|
||||
@@ -7,7 +7,5 @@
|
||||
//// await 300;
|
||||
////}
|
||||
|
||||
verify.rangesAreOccurrences(false);
|
||||
|
||||
goTo.marker();
|
||||
verify.occurrencesAtPositionCount(0);
|
||||
Reference in New Issue
Block a user