Skip to content

Commit 2bc5437

Browse files
authored
Merge pull request webpack#7532 from Legends/CommentCompilationWarning
CommentCompilationWarning typings
2 parents 4fc03e1 + 2fb9a6c commit 2bc5437

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

lib/CommentCompilationWarning.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,17 @@
66

77
const WebpackError = require("./WebpackError");
88

9+
/** @typedef {import("./Module.js")} Module */
10+
11+
/** @typedef {import("./Dependency.js").Loc} Loc */
12+
913
class CommentCompilationWarning extends WebpackError {
14+
/**
15+
*
16+
* @param {string} message warning message
17+
* @param {Module} module affected module
18+
* @param {Loc} loc affected lines of code
19+
*/
1020
constructor(message, module, loc) {
1121
super(message);
1222

lib/Dependency.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@
77
const compareLocations = require("./compareLocations");
88
const DependencyReference = require("./dependencies/DependencyReference");
99

10+
/** @typedef {Object} Position
11+
* @property {number} column
12+
* @property {number} line
13+
*/
14+
15+
/** @typedef {Object} Loc
16+
* @property {Position} start
17+
* @property {Position} end
18+
*/
19+
1020
class Dependency {
1121
constructor() {
1222
this.module = null;

0 commit comments

Comments
 (0)