source: trip-planner-front/node_modules/webpack/lib/GraphHelpers.js@ 6c1585f

Last change on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.0 KB
RevLine 
[6a3a178]1/*
2 MIT License http://www.opensource.org/licenses/mit-license.php
3 Author Tobias Koppers @sokra
4*/
5
6"use strict";
7
8/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */
9/** @typedef {import("./Chunk")} Chunk */
10/** @typedef {import("./ChunkGroup")} ChunkGroup */
11/** @typedef {import("./DependenciesBlock")} DependenciesBlock */
12/** @typedef {import("./Module")} Module */
13
14/**
15 * @param {ChunkGroup} chunkGroup the ChunkGroup to connect
16 * @param {Chunk} chunk chunk to tie to ChunkGroup
17 * @returns {void}
18 */
19const connectChunkGroupAndChunk = (chunkGroup, chunk) => {
20 if (chunkGroup.pushChunk(chunk)) {
21 chunk.addGroup(chunkGroup);
22 }
23};
24
25/**
26 * @param {ChunkGroup} parent parent ChunkGroup to connect
27 * @param {ChunkGroup} child child ChunkGroup to connect
28 * @returns {void}
29 */
30const connectChunkGroupParentAndChild = (parent, child) => {
31 if (parent.addChild(child)) {
32 child.addParent(parent);
33 }
34};
35
36exports.connectChunkGroupAndChunk = connectChunkGroupAndChunk;
37exports.connectChunkGroupParentAndChild = connectChunkGroupParentAndChild;
Note: See TracBrowser for help on using the repository browser.