yarn start
TypeScript 5.1 change the way they transpile enum
to JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Enum_TS_5_0 = void 0;
var Enum_TS_5_0;
(function (Enum_TS_5_0) {
Enum_TS_5_0["Value"] = "Value";
})((Enum_TS_5_0 = exports.Enum_TS_5_0 || (exports.Enum_TS_5_0 = {})));
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Enum_TS_5_1 = void 0;
var Enum_TS_5_1;
(function (Enum_TS_5_1) {
Enum_TS_5_1["Value"] = "Value";
})(Enum_TS_5_1 || (exports.Enum_TS_5_1 = Enum_TS_5_1 = {}));
Enable "buildOptimizer": true
in you angular.json
file will break the way enum is loaded in your angular application.
import { Enum_TS_5_0 } from "./Enum_TS_5_0";
import { Enum_TS_5_1 } from "./Enum_TS_5_1";
console.log("Enum_TS_5_0", Enum_TS_5_0);
console.log("Enum_TS_5_1", Enum_TS_5_1);
Enum_TS_5_1 undefined
Enum_TS_5_0 { "Value": "Value" }