MCPcopy
hub / github.com/webpack/webpack / deserialize

Method deserialize

lib/NormalModule.js:2299–2322  ·  view source on GitHub ↗

* @param {ObjectDeserializerContext} context context * @returns {NormalModule} module

(context)

Source from the content-addressed store, hash-verified

2297 * @returns {NormalModule} module
2298 */
2299 static deserialize(context) {
2300 // `new this` so subclasses without extra constructor options inherit this method
2301 const obj = new this({
2302 // will be deserialized by Module
2303 layer: /** @type {EXPECTED_ANY} */ (null),
2304 type: "",
2305 // will be filled by updateCacheModule
2306 resource: "",
2307 context: "",
2308 request: /** @type {EXPECTED_ANY} */ (null),
2309 userRequest: /** @type {EXPECTED_ANY} */ (null),
2310 rawRequest: /** @type {EXPECTED_ANY} */ (null),
2311 loaders: /** @type {EXPECTED_ANY} */ (null),
2312 matchResource: /** @type {EXPECTED_ANY} */ (null),
2313 parser: /** @type {EXPECTED_ANY} */ (null),
2314 parserOptions: /** @type {EXPECTED_ANY} */ (null),
2315 generator: /** @type {EXPECTED_ANY} */ (null),
2316 generatorOptions: /** @type {EXPECTED_ANY} */ (null),
2317 resolveOptions: /** @type {EXPECTED_ANY} */ (null),
2318 extractSourceMap: /** @type {EXPECTED_ANY} */ (null)
2319 });
2320 obj.deserialize(context);
2321 return obj;
2322 }
2323
2324 /**
2325 * Restores this instance from the provided deserializer context.

Callers

nothing calls this directly

Calls 1

readFunction · 0.50

Tested by

no test coverage detected