| | |
| | | |
| | | class ConstDependency extends NullDependency { |
| | | /** |
| | | * Creates an instance of ConstDependency. |
| | | * @param {string} expression the expression |
| | | * @param {number | Range} range the source range |
| | | * @param {RawRuntimeRequirements | null=} runtimeRequirements runtime requirements |
| | |
| | | this.runtimeRequirements = runtimeRequirements |
| | | ? new Set(runtimeRequirements) |
| | | : null; |
| | | /** @type {undefined | string} */ |
| | | this._hashUpdate = undefined; |
| | | } |
| | | |
| | | /** |
| | | * Update the hash |
| | | * Updates the hash with the data contributed by this instance. |
| | | * @param {Hash} hash hash to be updated |
| | | * @param {UpdateHashContext} context context |
| | | * @returns {void} |
| | |
| | | } |
| | | |
| | | /** |
| | | * Gets module evaluation side effects state. |
| | | * @param {ModuleGraph} moduleGraph the module graph |
| | | * @returns {ConnectionState} how this dependency connects the module to referencing modules |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Serializes this instance into the provided serializer context. |
| | | * @param {ObjectSerializerContext} context context |
| | | */ |
| | | serialize(context) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Restores this instance from the provided deserializer context. |
| | | * @param {ObjectDeserializerContext} context context |
| | | */ |
| | | deserialize(context) { |
| | |
| | | NullDependency.Template |
| | | ) { |
| | | /** |
| | | * Applies the plugin by registering its hooks on the compiler. |
| | | * @param {Dependency} dependency the dependency for which the template should be applied |
| | | * @param {ReplaceSource} source the current replace source which can be modified |
| | | * @param {DependencyTemplateContext} templateContext the context object |