Skip to content

Commit

Permalink
improve typing for readdirpPromise
Browse files Browse the repository at this point in the history
  • Loading branch information
yuheiy committed Sep 17, 2024
1 parent c62879e commit ff98f4a
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 ff98f4a

Please sign in to comment.