- findAncestor(
currentPath: string,
callback: (path: string) => Promise<boolean>,
): Promise<string | undefined> Parameters
- currentPath: string
- callback: (path: string) => Promise<boolean>
Returns Promise<string | undefined>
- findAncestor(
currentPath: string,
callback: (path: string) => boolean,
): string | undefined Parameters
- currentPath: string
- callback: (path: string) => boolean
Returns string | undefined
- findAncestor(
currentPath: string,
callback: (path: string) => MaybePromise<boolean>,
): MaybePromise<string | undefined> Parameters
- currentPath: string
- callback: (path: string) => MaybePromise<boolean>
Returns MaybePromise<string | undefined>
Find an ancestor file path that matches the given
callback
. If no matches are found all the way up until the system root, this returnsundefined
.Returns
undefined
if no matches are found.Package
@augment-vir/node