diff --git a/lib/CommentCompilationWarning.js b/lib/CommentCompilationWarning.js index c261dae1592..1b83147ddd7 100644 --- a/lib/CommentCompilationWarning.js +++ b/lib/CommentCompilationWarning.js @@ -8,15 +8,9 @@ const WebpackError = require("./WebpackError"); /** @typedef {import("./Module.js")} Module */ -/** @typedef {Object} Position - * @property {number} column - * @property {number} line - */ - -/** @typedef {Object} Loc - * @property {Position} start - * @property {Position} end - */ +/** @typedef {import("./Dependency.js").Position} Position */ + +/** @typedef {import("./Dependency.js").Loc} Loc */ class CommentCompilationWarning extends WebpackError { /** diff --git a/lib/Dependency.js b/lib/Dependency.js index a5a5c23e21e..f489b11cca2 100644 --- a/lib/Dependency.js +++ b/lib/Dependency.js @@ -48,4 +48,17 @@ class Dependency { } Dependency.compare = (a, b) => compareLocations(a.loc, b.loc); +/** @typedef {Object} Position + * @property {number} column + * @property {number} line + */ + +/** @typedef {Object} Loc + * @property {Position} start + * @property {Position} end + */ + +exports Position; +exports Loc; + module.exports = Dependency;