1 | /** A path to check its ignore status */
|
2 | export interface Path {
|
3 | /** The absolute path, if any */
|
4 | absolutePath?: string;
|
5 | /** The relative path, if any */
|
6 | relativePath?: string;
|
7 | /** If basename of the path, if any */
|
8 | basename?: string;
|
9 | }
|
10 | /** Ignore Options */
|
11 | export interface Options {
|
12 | /** Absolute paths to ignore */
|
13 | ignoreAbsolutePaths?: Array<string | RegExp>;
|
14 | /** Relative paths to ignore */
|
15 | ignoreRelativePaths?: Array<string | RegExp>;
|
16 | /** Basenames to ignore */
|
17 | ignoreBasenames?: Array<string | RegExp>;
|
18 | /** @deprecated alias for {@link isIgnoredPathCompatibility} that puts absolute paths in {@link ignoreAbsolutePaths}, relative paths in {@link ignoreRelativePaths}, and basenames in {@link ignoreBasenames} */
|
19 | ignorePaths?: Array<string | RegExp>;
|
20 | /** Ignore basenames that begin with a `.` character */
|
21 | ignoreHiddenBasenames?: boolean;
|
22 | /** @deprecated aliases {@link Options.ignoreHiddenBasenames} for {@link isIgnoredPathCompatibility} */
|
23 | ignoreHiddenFiles?: boolean;
|
24 | /** Ignore commonly undesirable basenames: https://github.com/bevry/ignorepatterns */
|
25 | ignoreUndesiredBasenames?: boolean;
|
26 | /** @deprecated aliases {@link Options.ignoreUndesiredBasenames} for {@link isIgnoredPathCompatibility} */
|
27 | ignoreCommonPatterns?: boolean;
|
28 | /** Test against each {@link Path} property */
|
29 | ignoreCustomPatterns?: RegExp;
|
30 | /** Your own ignore handler */
|
31 | ignoreCustomCallback?: (path: Path) => boolean | void;
|
32 | }
|
33 | /** Tests whether the path should be ignored */
|
34 | export declare function isIgnoredPath(path: Path, opts?: Options): boolean;
|
35 | /** Verify options and upgrade deprecations, returns dereferenced copy */
|
36 | export declare function upgradeOptions(opts: Options): Options;
|
37 | /** Compatibility wrapper for {@link isIgnoredPath}, supporting path string, verifying path object and options, and handling option deprecations */
|
38 | export default function isIgnoredPathCompatibility(path: Path | string, opts?: Options): boolean;
|
39 | //# sourceMappingURL=index.d.ts.map |
\ | No newline at end of file |