/** * A valid glob pattern, or array of patterns. */ export type FilterPattern = ReadonlyArray | string | RegExp | null; export interface FilePathFilterOptions { /** A pattern, or array of patterns, which specify the files should operate on. */ include?: FilterPattern; /** A pattern, or array of patterns, which specify the files should ignore. */ exclude?: FilterPattern; extensions?: string[]; /** * custom glob matcher. For example: * ### use picomatch * ```ts * import picomatch from 'picomatch'; * * const globMatcher = (pathId, ruleIdNormalized, _ruleId) => { * return picomatch(ruleIdNormalized, { dot: true })(pathId); * }; * ``` * ### use micromatch * ```ts * import { isMatch } from 'micromatch'; * * const globMatcher = (pathId, ruleIdNormalized, _ruleId) => { * return isMatch(pathId, ruleIdNormalized, { dot: true }); * }; * ``` */ globMatcher?: (pathId: string, ruleIdNormalized: string, ruleId: string) => boolean; /** resolve with base path for options.include and options.exclude */ resolve?: string | false | null; } export declare function createFilePathFilter(options?: FilePathFilterOptions): (id: unknown) => boolean;