Skip to content

Commit

Permalink
Merge pull request #7532 from Legends/CommentCompilationWarning
Browse files Browse the repository at this point in the history
CommentCompilationWarning typings
  • Loading branch information
sokra committed Jun 23, 2018
2 parents 4fc03e1 + 2fb9a6c commit 2bc5437
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/CommentCompilationWarning.js
Expand Up @@ -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);

Expand Down
10 changes: 10 additions & 0 deletions lib/Dependency.js
Expand Up @@ -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;
Expand Down

0 comments on commit 2bc5437

Please sign in to comment.