Merge pull request #15740 from AviVahl/master

Match klaw's Options with implementation
This commit is contained in:
Yui
2017-04-13 08:53:43 -07:00
committed by GitHub
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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"
+2 -2
View File
@@ -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] !== '.'
}