mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-11 15:48:14 -05:00
For performance reasons, we should always pass sourceFile to getChildren if available.
This commit is contained in:
@@ -679,7 +679,7 @@ namespace ts {
|
||||
let current: Node = sourceFile;
|
||||
outer: while (true) {
|
||||
// find the child that contains 'position'
|
||||
for (const child of current.getChildren()) {
|
||||
for (const child of current.getChildren(sourceFile)) {
|
||||
const start = allowPositionInLeadingTrivia ? child.getFullStart() : child.getStart(sourceFile, /*includeJsDoc*/ true);
|
||||
if (start > position) {
|
||||
// If this child begins after position, then all subsequent children will as well.
|
||||
|
||||
Reference in New Issue
Block a user