modifying node.getChildren to ts.forEachChild

Signed-off-by: s00912778 <shijiakai2@huawei.com>
Change-Id: I2dbf4030279f2ea1307ce726aa52d28dd424a156
This commit is contained in:
s00912778 2024-11-01 11:20:12 +08:00
parent 2522c6c80d
commit bbb04372a5
3 changed files with 3 additions and 3 deletions

View File

@ -1267,7 +1267,7 @@ function parseAllNode(node: ts.Node, sourceFileNode: ts.SourceFile, extendFuncti
});
}
}
node.getChildren().forEach((item: ts.Node) => parseAllNode(item, sourceFileNode, extendFunctionInfo));
ts.forEachChild(node, (child: ts.Node) => parseAllNode(child, sourceFileNode, extendFunctionInfo));
}
function isForeachAndLzayForEach(node: ts.Node): boolean {

View File

@ -826,7 +826,7 @@ function traverseExpressionNode(node: ts.Node, result: Record<string, boolean>):
result.hasQuestionToken = true;
}
if (!result.hasQuestionToken) {
node.getChildren().forEach((item: ts.Node) => traverseExpressionNode(item, result));
ts.forEachChild(node, (child: ts.Node) => traverseExpressionNode(child, result));
}
}

View File

@ -472,7 +472,7 @@ function visitAllNode(node: ts.Node, sourceFileNode: ts.SourceFile, allComponent
checkDecoratorCount(node, sourceFileNode, log);
checkDecorator(sourceFileNode, node, log, structContext, classContext, isObservedClass, isComponentV2,
isObservedV1Class, isSendableClass);
node.getChildren().forEach((item: ts.Node) => visitAllNode(item, sourceFileNode, allComponentNames, log,
ts.forEachChild(node, (child: ts.Node) => visitAllNode(child, sourceFileNode, allComponentNames, log,
structContext, classContext, isObservedClass, isComponentV2, fileQuery, isObservedV1Class, isSendableClass));
structContext = false;
classContext = false;