WXL
3 天以前 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1
node_modules/webpack/lib/Parser.js
@@ -12,6 +12,7 @@
/** @typedef {Record<string, EXPECTED_ANY>} PreparsedAst */
/**
 * Defines the parser state base type used by this module.
 * @typedef {object} ParserStateBase
 * @property {string | Buffer} source
 * @property {NormalModule} current
@@ -20,11 +21,12 @@
 * @property {WebpackOptions} options
 */
/** @typedef {Record<string, EXPECTED_ANY> & ParserStateBase} ParserState */
/** @typedef {ParserStateBase & Record<string, EXPECTED_ANY>} ParserState */
class Parser {
   /* istanbul ignore next */
   /**
    * Parses the provided source and updates the parser state.
    * @abstract
    * @param {string | Buffer | PreparsedAst} source the source to parse
    * @param {ParserState} state the parser state