Skip to content

Commit 7785ba8

Browse files
authored
Merge pull request #70 from nicojs/patch-1
fix(types): allow for readonly arrays
2 parents aeb459d + 64e9992 commit 7785ba8

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

index.d.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,20 @@ interface TestResult {
77

88
export interface Ignore {
99
/**
10-
* Adds a rule rules to the current manager.
11-
* @param {string | Ignore} pattern
12-
* @returns IgnoreBase
13-
*/
14-
add(pattern: string | Ignore): this
15-
/**
16-
* Adds several rules to the current manager.
10+
* Adds one or several rules to the current manager.
1711
* @param {string[]} patterns
1812
* @returns IgnoreBase
1913
*/
20-
add(patterns: (string | Ignore)[]): this
14+
add(patterns: string | Ignore | readonly (string | Ignore)[]): this
2115

2216
/**
2317
* Filters the given array of pathnames, and returns the filtered array.
2418
* NOTICE that each path here should be a relative path to the root of your repository.
2519
* @param paths the array of paths to be filtered.
2620
* @returns The filtered array of paths
2721
*/
28-
filter(pathnames: Pathname[]): Pathname[]
22+
filter(pathnames: readonly Pathname[]): Pathname[]
23+
2924
/**
3025
* Creates a filter function which could filter
3126
* an array of paths with Array.prototype.filter.

0 commit comments

Comments
 (0)