| 1 | // IncludeOptions definitions copied from minimatch (https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/minimatch/index.d.ts)
|
|---|
| 2 | interface IncludeOptions {
|
|---|
| 3 | /**
|
|---|
| 4 | * Dump a ton of stuff to stderr.
|
|---|
| 5 | *
|
|---|
| 6 | * @default false
|
|---|
| 7 | */
|
|---|
| 8 | debug?: boolean;
|
|---|
| 9 |
|
|---|
| 10 | /**
|
|---|
| 11 | * Do not expand {a,b} and {1..3} brace sets.
|
|---|
| 12 | *
|
|---|
| 13 | * @default false
|
|---|
| 14 | */
|
|---|
| 15 | nobrace?: boolean;
|
|---|
| 16 |
|
|---|
| 17 | /**
|
|---|
| 18 | * Disable ** matching against multiple folder names.
|
|---|
| 19 | *
|
|---|
| 20 | * @default false
|
|---|
| 21 | */
|
|---|
| 22 | noglobstar?: boolean;
|
|---|
| 23 |
|
|---|
| 24 | /**
|
|---|
| 25 | * Allow patterns to match filenames starting with a period,
|
|---|
| 26 | * even if the pattern does not explicitly have a period in that spot.
|
|---|
| 27 | *
|
|---|
| 28 | * @default false
|
|---|
| 29 | */
|
|---|
| 30 | dot?: boolean;
|
|---|
| 31 |
|
|---|
| 32 | /**
|
|---|
| 33 | * Disable "extglob" style patterns like +(a|b).
|
|---|
| 34 | *
|
|---|
| 35 | * @default false
|
|---|
| 36 | */
|
|---|
| 37 | noext?: boolean;
|
|---|
| 38 |
|
|---|
| 39 | /**
|
|---|
| 40 | * Perform a case-insensitive match.
|
|---|
| 41 | *
|
|---|
| 42 | * @default false
|
|---|
| 43 | */
|
|---|
| 44 | nocase?: boolean;
|
|---|
| 45 |
|
|---|
| 46 | /**
|
|---|
| 47 | * When a match is not found by minimatch.match,
|
|---|
| 48 | * return a list containing the pattern itself if this option is set.
|
|---|
| 49 | * Otherwise, an empty list is returned if there are no matches.
|
|---|
| 50 | *
|
|---|
| 51 | * @default false
|
|---|
| 52 | */
|
|---|
| 53 | nonull?: boolean;
|
|---|
| 54 |
|
|---|
| 55 | /**
|
|---|
| 56 | * If set, then patterns without slashes will be matched against
|
|---|
| 57 | * the basename of the path if it contains slashes.
|
|---|
| 58 | *
|
|---|
| 59 | * @default false
|
|---|
| 60 | */
|
|---|
| 61 | matchBase?: boolean;
|
|---|
| 62 |
|
|---|
| 63 | /**
|
|---|
| 64 | * Suppress the behavior of treating #
|
|---|
| 65 | * at the start of a pattern as a comment.
|
|---|
| 66 | *
|
|---|
| 67 | * @default false
|
|---|
| 68 | */
|
|---|
| 69 | nocomment?: boolean;
|
|---|
| 70 |
|
|---|
| 71 | /**
|
|---|
| 72 | * Suppress the behavior of treating a leading ! character as negation.
|
|---|
| 73 | *
|
|---|
| 74 | * @default false
|
|---|
| 75 | */
|
|---|
| 76 | nonegate?: boolean;
|
|---|
| 77 |
|
|---|
| 78 | /**
|
|---|
| 79 | * Returns from negate expressions the same as if they were not negated.
|
|---|
| 80 | * (Ie, true on a hit, false on a miss.)
|
|---|
| 81 | *
|
|---|
| 82 | * @default false
|
|---|
| 83 | */
|
|---|
| 84 | flipNegate?: boolean;
|
|---|
| 85 | }
|
|---|
| 86 |
|
|---|
| 87 | export class FileList {
|
|---|
| 88 | static clone(): FileList
|
|---|
| 89 | static verbose: boolean
|
|---|
| 90 | }
|
|---|
| 91 |
|
|---|
| 92 | export interface FileList extends Omit<Array<string>, "length"> {
|
|---|
| 93 | pendingAdd: string[]
|
|---|
| 94 | pending: boolean
|
|---|
| 95 | excludes: {
|
|---|
| 96 | pats: RegExp[],
|
|---|
| 97 | funcs: Function[],
|
|---|
| 98 | regex: null | RegExp
|
|---|
| 99 | }
|
|---|
| 100 | items: string[]
|
|---|
| 101 | toArray(): string[]
|
|---|
| 102 | include(...items: string[]): this
|
|---|
| 103 | include(...items: (IncludeOptions | string)[]): this
|
|---|
| 104 | exclude(...items: string[]): this
|
|---|
| 105 | shouldExclude(item: string): boolean
|
|---|
| 106 | resolve(): this
|
|---|
| 107 | clearInclusions(): this
|
|---|
| 108 | clearExclusions(): this
|
|---|
| 109 | length(): number
|
|---|
| 110 | } |
|---|