Skip to content

Commit

Permalink
Importing typedef from Dependency.js ??? Please review.
Browse files Browse the repository at this point in the history
  • Loading branch information
Legends committed Jun 21, 2018
1 parent 16bf799 commit 7969a5a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
12 changes: 3 additions & 9 deletions lib/CommentCompilationWarning.js
Expand Up @@ -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 {
/**
Expand Down
13 changes: 13 additions & 0 deletions lib/Dependency.js
Expand Up @@ -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;

0 comments on commit 7969a5a

Please sign in to comment.