Files
personal_site/frontend/node_modules/@aws-cdk/toolkit-lib/lib/util/glob-matcher.d.ts
T

34 lines
1.1 KiB
TypeScript
Raw Normal View History

/**
* Options for creating a glob matcher
*/
export interface GlobMatcherOptions {
/**
* Patterns for files to include (glob patterns)
* @default ['**'] - match all files
*/
include?: string[];
/**
* Patterns for files to exclude (glob patterns)
*/
exclude?: string[];
/**
* The root directory for matching. If provided, absolute paths will be
* converted to relative paths before matching against patterns.
* This is necessary because chokidar v4 passes absolute paths to the
* ignored callback even when a cwd is specified.
*/
rootDir?: string;
}
/**
* Creates a function that returns true if a file should be ignored.
* A file is ignored if:
* - It matches any exclude pattern, OR
* - It does NOT match any include pattern
*
* This replicates the behavior of chokidar v3's glob pattern support.
*
* @param options - The include and exclude patterns
* @returns A function that takes a file path and returns true if it should be ignored
*/
export declare function createIgnoreMatcher(options: GlobMatcherOptions): (filePath: string) => boolean;
//# sourceMappingURL=glob-matcher.d.ts.map