source: imaps-frontend/node_modules/webpack/lib/dependencies/AMDRequireContextDependency.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 MIT License http://www.opensource.org/licenses/mit-license.php
3 Author Tobias Koppers @sokra
4*/
5
6"use strict";
7
8const makeSerializable = require("../util/makeSerializable");
9const ContextDependency = require("./ContextDependency");
10
11/** @typedef {import("../javascript/JavascriptParser").Range} Range */
12/** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
13/** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
14
15class AMDRequireContextDependency extends ContextDependency {
16 /**
17 * @param {TODO} options options
18 * @param {Range} range range
19 * @param {Range} valueRange value range
20 */
21 constructor(options, range, valueRange) {
22 super(options);
23
24 this.range = range;
25 this.valueRange = valueRange;
26 }
27
28 get type() {
29 return "amd require context";
30 }
31
32 get category() {
33 return "amd";
34 }
35
36 /**
37 * @param {ObjectSerializerContext} context context
38 */
39 serialize(context) {
40 const { write } = context;
41
42 write(this.range);
43 write(this.valueRange);
44
45 super.serialize(context);
46 }
47
48 /**
49 * @param {ObjectDeserializerContext} context context
50 */
51 deserialize(context) {
52 const { read } = context;
53
54 this.range = read();
55 this.valueRange = read();
56
57 super.deserialize(context);
58 }
59}
60
61makeSerializable(
62 AMDRequireContextDependency,
63 "webpack/lib/dependencies/AMDRequireContextDependency"
64);
65
66AMDRequireContextDependency.Template = require("./ContextDependencyTemplateAsRequireCall");
67
68module.exports = AMDRequireContextDependency;
Note: See TracBrowser for help on using the repository browser.