-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
types(vite): replace
any
with Matcher
for chokidar WatchOptions#i…
…gnored
- Loading branch information
heyunfei.i
committed
Aug 16, 2021
1 parent
3f40bbb
commit cd50620
Showing
3 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
type AnymatchFn = (testString: string) => boolean | ||
type AnymatchPattern = string | RegExp | AnymatchFn | ||
type AnymatchMatcher = AnymatchPattern | AnymatchPattern[] | ||
type AnymatchTester = { | ||
(testString: string | any[], returnIndex: true): number | ||
(testString: string | any[]): boolean | ||
} | ||
|
||
type PicomatchOptions = { dot: boolean } | ||
|
||
declare const anymatch: { | ||
(matchers: AnymatchMatcher): AnymatchTester | ||
( | ||
matchers: AnymatchMatcher, | ||
testString: null, | ||
returnIndex: true | PicomatchOptions | ||
): AnymatchTester | ||
( | ||
matchers: AnymatchMatcher, | ||
testString: string | any[], | ||
returnIndex: true | PicomatchOptions | ||
): number | ||
(matchers: AnymatchMatcher, testString: string | any[]): boolean | ||
} | ||
|
||
export { AnymatchMatcher as Matcher } | ||
export { AnymatchTester as Tester } | ||
export default anymatch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters