mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-13 05:20:25 +00:00
Merge pull request #15740 from AviVahl/master
Match klaw's Options with implementation
This commit is contained in:
Vendored
+2
-2
@@ -22,9 +22,9 @@ declare module "klaw" {
|
||||
|
||||
interface Options extends ReadableOptions {
|
||||
queueMethod?: QueueMethod
|
||||
pathSorter?: (a: Array<Item>) => Array<Item>
|
||||
pathSorter?: (pathA: string, pathB: string) => number
|
||||
fs?: any // fs or mock-fs
|
||||
filter?: (a: Item) => boolean
|
||||
filter?: (path: string) => boolean
|
||||
}
|
||||
|
||||
type Event = "close" | "data" | "end" | "readable" | "error"
|
||||
|
||||
@@ -32,8 +32,8 @@ klaw('/some/dir')
|
||||
|
||||
// README.md: Example (ignore hidden directories):
|
||||
|
||||
var filterFunc = function(item: klaw.Item): boolean {
|
||||
var basename = path.basename(item.path)
|
||||
var filterFunc = function(item: string): boolean {
|
||||
var basename = path.basename(item);
|
||||
return basename === '.' || basename[0] !== '.'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user