WXL
3 天以前 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1
node_modules/webpack/lib/rules/BasicMatcherRulePlugin.js
@@ -11,6 +11,7 @@
/** @typedef {import("./RuleSetCompiler")} RuleSetCompiler */
/**
 * Defines the keys of types type used by this module.
 * @template T
 * @template {T[keyof T]} V
 * @typedef {import("./RuleSetCompiler").KeysOfTypes<T, V>} KeysOfTypes
@@ -22,17 +23,22 @@
class BasicMatcherRulePlugin {
   /**
    * Creates an instance of BasicMatcherRulePlugin.
    * @param {BasicMatcherRuleKeys} ruleProperty the rule property
    * @param {string=} dataProperty the data property
    * @param {boolean=} invert if true, inverts the condition
    */
   constructor(ruleProperty, dataProperty, invert) {
      /** @type {BasicMatcherRuleKeys} */
      this.ruleProperty = ruleProperty;
      /** @type {string | BasicMatcherRuleKeys} */
      this.dataProperty = dataProperty || ruleProperty;
      /** @type {boolean} */
      this.invert = invert || false;
   }
   /**
    * Applies the plugin by registering its hooks on the compiler.
    * @param {RuleSetCompiler} ruleSetCompiler the rule set compiler
    * @returns {void}
    */