diff --git a/src/views/viewBase.ts b/src/views/viewBase.ts index bba6b5b..25f971b 100644 --- a/src/views/viewBase.ts +++ b/src/views/viewBase.ts @@ -483,17 +483,12 @@ export abstract class ViewBase< }) async findNode( predicate: (node: ViewNode) => boolean, - { - allowPaging = false, - canTraverse, - maxDepth = 2, - token, - }: { + options?: { allowPaging?: boolean; canTraverse?: (node: ViewNode) => boolean | Promise; maxDepth?: number; token?: CancellationToken; - } = {}, + }, ): Promise { const scope = getLogScope(); @@ -502,10 +497,10 @@ export abstract class ViewBase< const node = await this.findNodeCoreBFS( predicate, this.ensureRoot(), - allowPaging, - canTraverse, - maxDepth, - token, + options?.allowPaging ?? false, + options?.canTraverse, + options?.maxDepth ?? 2, + options?.token, ); return node;