UNPKG

622 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var environment_1 = require("./environment");
4var haveWarned = Object.create({});
5function warnOnceInDevelopment(msg, type) {
6 if (type === void 0) { type = 'warn'; }
7 if (!environment_1.isProduction() && !haveWarned[msg]) {
8 if (!environment_1.isTest()) {
9 haveWarned[msg] = true;
10 }
11 if (type === 'error') {
12 console.error(msg);
13 }
14 else {
15 console.warn(msg);
16 }
17 }
18}
19exports.warnOnceInDevelopment = warnOnceInDevelopment;
20//# sourceMappingURL=warnOnce.js.map
\No newline at end of file