Add ts declarations

This commit is contained in:
Connor Davis 2019-01-09 13:53:04 -06:00
parent 78abf04fc3
commit 80514cc282
No known key found for this signature in database
GPG Key ID: 9E3CD9875570DB83
2 changed files with 9 additions and 1 deletions

8
declarations.d.ts vendored
View File

@ -77,6 +77,13 @@ declare module "neo-async" {
callback?: ErrorCallback<E>
): void;
export function eachLimit<T, E>(
arr: IterableCollection<T>,
limit: number,
iterator: AsyncIterator<T, E>,
callback?: ErrorCallback<E>
): void;
export function map<T, R, E>(
arr: T[] | IterableIterator<T>,
iterator: AsyncResultIterator<T, R, E>,
@ -98,6 +105,7 @@ declare module "neo-async" {
): void;
export const forEach: typeof each;
export const forEachLimit: typeof eachLimit;
}
// There are no typings for @webassemblyjs/ast

View File

@ -312,7 +312,7 @@ class Compiler extends Tapable {
const emitFiles = err => {
if (err) return callback(err);
asyncLib.eachLimit(
asyncLib.forEachLimit(
compilation.assets,
15,
(source, file, callback) => {