feat: refactoring project
This commit is contained in:
46
node_modules/webpack/lib/CssModule.js
generated
vendored
46
node_modules/webpack/lib/CssModule.js
generated
vendored
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
Author Alexander Krasnoyarov @alexander-akait
|
||||
Author Alexander Akait @alexander-akait
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -14,13 +14,13 @@ const makeSerializable = require("./util/makeSerializable");
|
||||
/** @typedef {import("./serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
|
||||
/** @typedef {import("./serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
|
||||
|
||||
/** @typedef {string|undefined} CssLayer */
|
||||
/** @typedef {string|undefined} Supports */
|
||||
/** @typedef {string|undefined} Media */
|
||||
/** @typedef {[CssLayer?, Supports?, Media?]} InheritanceItem */
|
||||
/** @typedef {string | undefined} CssLayer */
|
||||
/** @typedef {string | undefined} Supports */
|
||||
/** @typedef {string | undefined} Media */
|
||||
/** @typedef {[CssLayer, Supports, Media]} InheritanceItem */
|
||||
/** @typedef {Array<InheritanceItem>} Inheritance */
|
||||
|
||||
/** @typedef {NormalModuleCreateData & { cssLayer: CssLayer|null, supports: Supports|null, media: Media|null, inheritance: Inheritance|null }} CSSModuleCreateData */
|
||||
/** @typedef {NormalModuleCreateData & { cssLayer: CssLayer, supports: Supports, media: Media, inheritance: Inheritance }} CSSModuleCreateData */
|
||||
|
||||
class CssModule extends NormalModule {
|
||||
/**
|
||||
@@ -127,30 +127,34 @@ class CssModule extends NormalModule {
|
||||
static deserialize(context) {
|
||||
const obj = new CssModule({
|
||||
// will be deserialized by Module
|
||||
layer: null,
|
||||
layer: /** @type {EXPECTED_ANY} */ (null),
|
||||
type: "",
|
||||
// will be filled by updateCacheModule
|
||||
resource: "",
|
||||
context: "",
|
||||
request: null,
|
||||
userRequest: null,
|
||||
rawRequest: null,
|
||||
loaders: null,
|
||||
matchResource: null,
|
||||
parser: null,
|
||||
parserOptions: null,
|
||||
generator: null,
|
||||
generatorOptions: null,
|
||||
resolveOptions: null,
|
||||
cssLayer: null,
|
||||
supports: null,
|
||||
media: null,
|
||||
inheritance: null
|
||||
request: /** @type {EXPECTED_ANY} */ (null),
|
||||
userRequest: /** @type {EXPECTED_ANY} */ (null),
|
||||
rawRequest: /** @type {EXPECTED_ANY} */ (null),
|
||||
loaders: /** @type {EXPECTED_ANY} */ (null),
|
||||
matchResource: /** @type {EXPECTED_ANY} */ (null),
|
||||
parser: /** @type {EXPECTED_ANY} */ (null),
|
||||
parserOptions: /** @type {EXPECTED_ANY} */ (null),
|
||||
generator: /** @type {EXPECTED_ANY} */ (null),
|
||||
generatorOptions: /** @type {EXPECTED_ANY} */ (null),
|
||||
resolveOptions: /** @type {EXPECTED_ANY} */ (null),
|
||||
cssLayer: /** @type {EXPECTED_ANY} */ (null),
|
||||
supports: /** @type {EXPECTED_ANY} */ (null),
|
||||
media: /** @type {EXPECTED_ANY} */ (null),
|
||||
inheritance: /** @type {EXPECTED_ANY} */ (null)
|
||||
});
|
||||
obj.deserialize(context);
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {ObjectDeserializerContext} context context
|
||||
* @returns {TODO} Module
|
||||
*/
|
||||
deserialize(context) {
|
||||
const { read } = context;
|
||||
this.cssLayer = read();
|
||||
|
||||
Reference in New Issue
Block a user