source: trip-planner-front/node_modules/webpack/lib/container/FallbackModuleFactory.js

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

initial commit

  • Property mode set to 100644
File size: 944 bytes
Line 
1/*
2 MIT License http://www.opensource.org/licenses/mit-license.php
3 Author Tobias Koppers @sokra, Zackary Jackson @ScriptedAlchemy, Marais Rossouw @maraisr
4*/
5
6"use strict";
7
8const ModuleFactory = require("../ModuleFactory");
9const FallbackModule = require("./FallbackModule");
10
11/** @typedef {import("../ModuleFactory").ModuleFactoryCreateData} ModuleFactoryCreateData */
12/** @typedef {import("../ModuleFactory").ModuleFactoryResult} ModuleFactoryResult */
13/** @typedef {import("./FallbackDependency")} FallbackDependency */
14
15module.exports = class FallbackModuleFactory extends ModuleFactory {
16 /**
17 * @param {ModuleFactoryCreateData} data data object
18 * @param {function(Error=, ModuleFactoryResult=): void} callback callback
19 * @returns {void}
20 */
21 create({ dependencies: [dependency] }, callback) {
22 const dep = /** @type {FallbackDependency} */ (dependency);
23 callback(null, {
24 module: new FallbackModule(dep.requests)
25 });
26 }
27};
Note: See TracBrowser for help on using the repository browser.