Skip to content

Commit

Permalink
Merge pull request #199 from yuheiy/fix-promise-typing
Browse files Browse the repository at this point in the history
improve typing for `readdirpPromise`
  • Loading branch information
paulmillr authored Sep 17, 2024
2 parents c62879e + ff98f4a commit 24cdcdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export const readdirp = (root: Path, options: Partial<ReaddirpOptions> = {}) =>
};

export const readdirpPromise = (root: Path, options: Partial<ReaddirpOptions> = {}) => {
return new Promise((resolve, reject) => {
return new Promise<Path[]>((resolve, reject) => {
const files: Path[] = [];
readdirp(root, options)
.on('data', (entry) => files.push(entry))
Expand Down

0 comments on commit 24cdcdb

Please sign in to comment.