Skip to content

Commit 80514cc

Browse files
committed
Add ts declarations
1 parent 78abf04 commit 80514cc

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

declarations.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ declare module "neo-async" {
7777
callback?: ErrorCallback<E>
7878
): void;
7979

80+
export function eachLimit<T, E>(
81+
arr: IterableCollection<T>,
82+
limit: number,
83+
iterator: AsyncIterator<T, E>,
84+
callback?: ErrorCallback<E>
85+
): void;
86+
8087
export function map<T, R, E>(
8188
arr: T[] | IterableIterator<T>,
8289
iterator: AsyncResultIterator<T, R, E>,
@@ -98,6 +105,7 @@ declare module "neo-async" {
98105
): void;
99106

100107
export const forEach: typeof each;
108+
export const forEachLimit: typeof eachLimit;
101109
}
102110

103111
// There are no typings for @webassemblyjs/ast

lib/Compiler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ class Compiler extends Tapable {
312312
const emitFiles = err => {
313313
if (err) return callback(err);
314314

315-
asyncLib.eachLimit(
315+
asyncLib.forEachLimit(
316316
compilation.assets,
317317
15,
318318
(source, file, callback) => {

0 commit comments

Comments
 (0)