CommentCompilationWarning.js 784 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. const WebpackError = require("./WebpackError");
  7. const makeSerializable = require("./util/makeSerializable");
  8. /** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */
  9. class CommentCompilationWarning extends WebpackError {
  10. /**
  11. * @param {string} message warning message
  12. * @param {DependencyLocation} loc affected lines of code
  13. */
  14. constructor(message, loc) {
  15. super(message);
  16. /** @type {string} */
  17. this.name = "CommentCompilationWarning";
  18. /** @type {DependencyLocation} */
  19. this.loc = loc;
  20. }
  21. }
  22. makeSerializable(
  23. CommentCompilationWarning,
  24. "webpack/lib/CommentCompilationWarning"
  25. );
  26. module.exports = CommentCompilationWarning;