doc: improve definition of addChunkInGroup via jsdoc

This commit is contained in:
Emily M Klassen 2022-01-18 15:44:17 -08:00
parent 5c0767a423
commit d5bb62b68e
2 changed files with 11 additions and 7 deletions

View File

@ -3553,10 +3553,11 @@ Or do you want to use the entrypoints '${name}' and '${runtime}' independently o
}
/**
* If `module` is passed, `loc` and `request` must also be passed.
* @param {string | ChunkGroupOptions} groupOptions options for the chunk group
* @param {Module} module the module the references the chunk group
* @param {DependencyLocation} loc the location from with the chunk group is referenced (inside of module)
* @param {string} request the request from which the the chunk group is referenced
* @param {Module=} module the module the references the chunk group
* @param {DependencyLocation=} loc the location from with the chunk group is referenced (inside of module)
* @param {string=} request the request from which the the chunk group is referenced
* @returns {ChunkGroup} the new or existing chunk group
*/
addChunkInGroup(groupOptions, module, loc, request) {

11
types.d.ts vendored
View File

@ -1644,12 +1644,15 @@ declare class Compilation {
module: RuntimeModule,
chunkGraph?: ChunkGraph
): void;
addChunkInGroup(groupOptions: string | ChunkGroupOptions): ChunkGroup;
/**
* If `module` is passed, `loc` and `request` must also be passed.
*/
addChunkInGroup(
groupOptions: string | ChunkGroupOptions,
module: Module,
loc: DependencyLocation,
request: string
module?: Module,
loc?: SyntheticDependencyLocation | RealDependencyLocation,
request?: string
): ChunkGroup;
addAsyncEntrypoint(
options: EntryOptions,