@@ -18,17 +18,8 @@ const ERR_CHUNK_INITIAL =
1818/** @typedef {import("./ModuleReason.js") } ModuleReason */
1919/** @typedef {import("webpack-sources").Source } Source */
2020
21- /** @typedef {(a: Module, b: Module) => -1|0|1 } ModuleSortPredicate */
22- /** @typedef {(m: Module) => boolean } ModuleFilterPredicate */
23- /** @typedef {(c: Chunk) => boolean } ChunkFilterPredicate */
24-
25- /**
26- * @typedef {Object } Identifiable an object who contains an identifier function property
27- * @property {() => string } identifier the resource or unique identifier of something
28- */
29-
3021/**
31- * @typedef {Object } WithId an object who has an id property
22+ * @typedef {Object } WithId an object who has an id property *
3223 * @property {string | number } id the id of the object
3324 */
3425
@@ -71,13 +62,13 @@ const getModulesIdent = set => {
7162
7263/**
7364 * @template T
74- * @param {Set <T> } set the set to convert to array
65+ * @param {SortableSet <T> } set the sortable set to convert to array
7566 * @returns {Array<T> } the array returned from Array.from(set)
7667 */
7768const getArray = set => Array . from ( set ) ;
7869
7970/**
80- * @param {Set <Module> } set the Set to get the count/size of
71+ * @param {SortableSet <Module> } set the sortable Set to get the count/size of
8172 * @returns {number } the size of the modules
8273 */
8374const getModulesSize = set => {
@@ -111,7 +102,7 @@ class Chunk {
111102 this . entryModule = undefined ;
112103 /** @private @type {SortableSet<Module> } */
113104 this . _modules = new SortableSet ( undefined , sortByIdentifier ) ;
114- /** @private @type {SortableSet<ChunkGroup | WithId > } */
105+ /** @private @type {SortableSet<ChunkGroup> } */
115106 this . _groups = new SortableSet ( undefined , sortById ) ;
116107 /** @type {Source[] } */
117108 this . files = [ ] ;
@@ -497,14 +488,14 @@ class Chunk {
497488 }
498489
499490 /**
500- * @param {ModuleSortPredicate = } sortByFn a predicate function used to sort modules
491+ * @param {function(Module, Module): -1|0|1 = } sortByFn a predicate function used to sort modules
501492 * @returns {void }
502493 */
503494 sortModules ( sortByFn ) {
504495 this . _modules . sortWith ( sortByFn || sortById ) ;
505496 }
506497
507- sortItems ( sortChunks ) {
498+ sortItems ( ) {
508499 this . sortModules ( ) ;
509500 }
510501
@@ -660,8 +651,8 @@ class Chunk {
660651
661652 /**
662653 *
663- * @param {ModuleFilterPredicate } filterFn predicate function used to filter modules
664- * @param {ChunkFilterPredicate } filterChunkFn predicate function used to filter chunks
654+ * @param {function(Module): boolean } filterFn predicate function used to filter modules
655+ * @param {function(Chunk): boolean } filterChunkFn predicate function used to filter chunks
665656 * @returns {boolean } return true if module exists in graph
666657 */
667658 hasModuleInGraph ( filterFn , filterChunkFn ) {
0 commit comments