export interface FilterComponent { filter(values: Array): Array; matches(value: string): boolean; } export interface IncludeExcludeFilterConfig { /** * If provided, the value needs to match at least one pattern * to be considered as passing the filter. */ includes?: Array; /** * If provided, the value cannot match any of the patterns * to be considered as passing the filter. */ excludes?: Array; } /** * Filter that allows for defining a set of regular expressions * for including a value or excluding a value based on the expressions. * * Depending on which config values are provided, the filtering * works differently. * * If both the `includes` and `excludes` are defined in the config * then the value being matched must match at least one of the * patterns in the `includes` and cannot match any of the `exclude` * patterns. * * If only `includes` are provided, the value must match at least * one of the patterns. * * If only the `excludes` are provides, the value cannot match any * of the patterns. */ export declare class IncludeExcludeFilter implements FilterComponent { config: IncludeExcludeFilterConfig; constructor(config: IncludeExcludeFilterConfig); protected convertRegex(values?: Array): void; filter(values: Array): Array; matches(value: string): boolean; } export interface GlobFilterConfig { /** * When true, the results of the match are flipped. * * For instance, when you want to filter out ignored files * you can use the `negate` option to filter out any matches. */ negate?: boolean; /** * Value needs to match at least one of the patterns to * pass the filtering. */ patterns: Array; } /** * Filtering use glob style patterns. */ export declare class GlobFilter implements FilterComponent { config: GlobFilterConfig; constructor(config: GlobFilterConfig); filter(values: Array): Array; matches(value: string): boolean; } export interface GitignoreFilterConfig { /** * Value needs to match at least one of the patterns to * pass the filtering. */ patterns: Array; } /** * Filtering use gitignore glob style patterns. */ export declare class GitignoreFilter implements FilterComponent { config: GitignoreFilterConfig; constructor(config: GitignoreFilterConfig); /** * * @param values Raw patterns for ignored filters * @returns */ protected convertPatterns(values: Array): Array; filter(values: Array): Array; matches(value: string): boolean; } /** * Escapes a string to be used as a 'constant' in a regex. * * @param value string to be escaped * @returns escaped string to use in regex. */ export declare function escapeRegExp(value: string): string;