mirror of https://github.com/webpack/webpack.git
Add ts declarations
This commit is contained in:
parent
78abf04fc3
commit
80514cc282
|
|
@ -77,6 +77,13 @@ declare module "neo-async" {
|
||||||
callback?: ErrorCallback<E>
|
callback?: ErrorCallback<E>
|
||||||
): void;
|
): 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>(
|
export function map<T, R, E>(
|
||||||
arr: T[] | IterableIterator<T>,
|
arr: T[] | IterableIterator<T>,
|
||||||
iterator: AsyncResultIterator<T, R, E>,
|
iterator: AsyncResultIterator<T, R, E>,
|
||||||
|
|
@ -98,6 +105,7 @@ declare module "neo-async" {
|
||||||
): void;
|
): void;
|
||||||
|
|
||||||
export const forEach: typeof each;
|
export const forEach: typeof each;
|
||||||
|
export const forEachLimit: typeof eachLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// There are no typings for @webassemblyjs/ast
|
// There are no typings for @webassemblyjs/ast
|
||||||
|
|
|
||||||
|
|
@ -312,7 +312,7 @@ class Compiler extends Tapable {
|
||||||
const emitFiles = err => {
|
const emitFiles = err => {
|
||||||
if (err) return callback(err);
|
if (err) return callback(err);
|
||||||
|
|
||||||
asyncLib.eachLimit(
|
asyncLib.forEachLimit(
|
||||||
compilation.assets,
|
compilation.assets,
|
||||||
15,
|
15,
|
||||||
(source, file, callback) => {
|
(source, file, callback) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue