Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
This commit is contained in:
commit
3590d5abff
4
src/webpack/wreq.d.ts
vendored
4
src/webpack/wreq.d.ts
vendored
|
@ -76,7 +76,7 @@ export type WebpackRequire = ((moduleId: PropertyKey) => Module) & {
|
||||||
/**
|
/**
|
||||||
* Creates an async module. A module that exports something that is a Promise, or requires an export from an async module.
|
* Creates an async module. A module that exports something that is a Promise, or requires an export from an async module.
|
||||||
*
|
*
|
||||||
* The body function must be an async function. "module.exports" will become a {@link AsyncModulePromise}.
|
* The body function must be an async function. "module.exports" will become an {@link AsyncModulePromise}.
|
||||||
*
|
*
|
||||||
* The body function will be called with a function to handle requires that import from an async module, and a function to resolve this async module. An example on how to handle async dependencies:
|
* The body function will be called with a function to handle requires that import from an async module, and a function to resolve this async module. An example on how to handle async dependencies:
|
||||||
* @example
|
* @example
|
||||||
|
@ -84,7 +84,7 @@ export type WebpackRequire = ((moduleId: PropertyKey) => Module) & {
|
||||||
* wreq.a(module, async (handleAsyncDependencies, asyncResult) => {
|
* wreq.a(module, async (handleAsyncDependencies, asyncResult) => {
|
||||||
* try {
|
* try {
|
||||||
* const asyncRequireA = wreq(...);
|
* const asyncRequireA = wreq(...);
|
||||||
*
|
*
|
||||||
* const asyncDependencies = handleAsyncDependencies([asyncRequire]);
|
* const asyncDependencies = handleAsyncDependencies([asyncRequire]);
|
||||||
* const [requireAResult] = asyncDependencies.then != null ? (await asyncDependencies)() : asyncDependencies;
|
* const [requireAResult] = asyncDependencies.then != null ? (await asyncDependencies)() : asyncDependencies;
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue