paulmillr / readdirp

Recursive version of fs.readdir with streaming api.
https://paulmillr.com
MIT License
378 stars 51 forks source link

Typings for `directoryFilter` option are wrong #145

Closed cedx closed 4 years ago

cedx commented 4 years ago

The directoryFilter option seems to accept the same parameters as the fileFilter option.

In the README.md file, we can read: directoryFilter: ['!.git'], that is an array of strings. But the TypeScript typings only allow: (entry: EntryInfo) => boolean.

It should probably be: string | string[] | ((entry: EntryInfo) => boolean)

paulmillr commented 4 years ago

Go ahead and change it!