/** * @template {FindValue} Value * Value to find. */ export class FindUp { /** * @param {Options} options * Configuration. * @returns * Self. */ constructor(options: Options); /** @type {Record> | Value | Error | undefined>} */ cache: Record> | Value | Error | undefined>; /** @type {string} */ cwd: string; /** @type {boolean | undefined} */ detect: boolean | undefined; /** @type {Array} */ names: Array; /** @type {Create} */ create: Create; /** @type {string | undefined} */ givenFilePath: string | undefined; /** @type {Array> | Error | Value | undefined} */ givenFile: Array> | Error | Value | undefined; /** * @param {string} filePath * File path to look from. * @param {Callback} callback * Callback called when done. * @returns {undefined} * Nothing. */ load(filePath: string, callback: Callback): undefined; } /** * Callback called when something is found. */ export type Callback = (error: Error | undefined, result?: Value | undefined) => undefined; /** * Transform a file to a certain value. */ export type Create = (value: Buffer, filePath: string) => Promise | Value | undefined; /** * Bare interface of value. */ export type FindValue = { /** * File path. */ filePath: string | undefined; }; /** * Configuration. */ export type Options = { /** * Base. */ cwd: string; /** * File path of a given file. */ filePath: URL | string | undefined; /** * Whether to detect files (default: `false`). */ detect?: boolean | undefined; /** * Basenames of files to look for. */ names: Array; /** * Turn a found file into a value. */ create: Create; }; //# sourceMappingURL=find-up.d.ts.map