error-message.js 753 B

123456789101112131415
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.errorMessage = void 0;
  4. const constants_1 = require("./constants");
  5. const formatErrorMessage = (message) => `[${constants_1.PACKAGE_NAME}] ${message}`;
  6. const messageByType = {
  7. impossible: `This error is caused by a bug. Please file an issue: ${constants_1.ISSUES_URL}.`,
  8. syncCompilation: 'Synchronous compilation is not supported.',
  9. invalidInjectorReturn: 'Expected options.injector(...) returns a string. Instead received number.',
  10. };
  11. exports.errorMessage = Object.entries(messageByType).reduce((errorMessage, [type, message]) => ({
  12. ...errorMessage,
  13. [type]: formatErrorMessage(message),
  14. }), messageByType);
  15. //# sourceMappingURL=error-message.js.map