diff --git a/src/webpack/wreq.d.ts b/src/webpack/wreq.d.ts index 4ac85a1cc..38038907a 100644 --- a/src/webpack/wreq.d.ts +++ b/src/webpack/wreq.d.ts @@ -15,9 +15,19 @@ export type Module = { /** exports can be anything, however initially it is always an empty object */ export type ModuleFactory = (this: ModuleExports, module: Module, exports: ModuleExports, require: WebpackRequire) => void; +export type WebpackQueues = unique symbol; +export type WebpackExports = unique symbol; +export type WebpackError = unique symbol; + +type AsyncModulePromise = Promise & { + [WebpackQueues]: (fnQueue: ((queue: any[]) => any)) => any; + [WebpackExports]: ModuleExports; + [WebpackError]?: any; +}; + export type AsyncModuleBody = ( - handleAsyncDependencies: (deps: Promise[]) => - Promise<() => any[]> | (() => any[]), + handleAsyncDependencies: (deps: AsyncModulePromise[]) => + Promise<() => ModuleExports[]> | (() => ModuleExports[]), asyncResult: (error?: any) => void ) => Promise;