diff --git a/lib/CommentCompilationWarning.js b/lib/CommentCompilationWarning.js index 29377e94692..4b1e6de5118 100644 --- a/lib/CommentCompilationWarning.js +++ b/lib/CommentCompilationWarning.js @@ -6,7 +6,17 @@ const WebpackError = require("./WebpackError"); +/** @typedef {import("./Module.js")} Module */ + +/** @typedef {import("./Dependency.js").Loc} Loc */ + class CommentCompilationWarning extends WebpackError { + /** + * + * @param {string} message warning message + * @param {Module} module affected module + * @param {Loc} loc affected lines of code + */ constructor(message, module, loc) { super(message); diff --git a/lib/Dependency.js b/lib/Dependency.js index 7bd2b5ef119..6995c798b19 100644 --- a/lib/Dependency.js +++ b/lib/Dependency.js @@ -7,6 +7,16 @@ const compareLocations = require("./compareLocations"); const DependencyReference = require("./dependencies/DependencyReference"); +/** @typedef {Object} Position + * @property {number} column + * @property {number} line + */ + +/** @typedef {Object} Loc + * @property {Position} start + * @property {Position} end + */ + class Dependency { constructor() { this.module = null;