sindresorhus / globby

User-friendly glob matching
MIT License
2.51k stars 130 forks source link

Types: `string[]` is still assumed to be returned even if the `objectMode` option is true #177

Closed Purpzie closed 3 years ago

Purpzie commented 3 years ago

I would submit a pull request, but I'm new to Typescript and I'm not sure how to define this. Currently being forced to do this:

type GlobbyResult = { name: string, path: string, dirent: Dirent }[];
const results: GlobbyResult = await globby([/* globs */], { objectMode: true }]) as any;

Thank you in advance!