Skip to content
  • arturovt's avatar
    refactor(common): drop enums by changing to `const enum` (#59468) · 9b7cb227
    arturovt authored
    Note: this enums are not a part of the public API.
    
    Prior to this commit, the compiler produced:
    
    ```js
    var DateType;
    (function (DateType) {
        DateType[DateType["FullYear"] = 0] = "FullYear";
        DateType[DateType["Month"] = 1] = "Month";
        DateType[DateType["Date"] = 2] = "Date";
        DateType[DateType["Hours"] = 3] = "Hours";
        DateType[DateType["Minutes"] = 4] = "Minutes";
        DateType[DateType["Seconds"] = 5] = "Seconds";
        DateType[DateType["FractionalSeconds"] = 6] = "FractionalSeconds";
        DateType[DateType["Day"] = 7] = "Day";
    })(DateType || (DateType = {}));
    ```
    
    With these changes, we allow objects to be dropped entirely and inlined.
    
    PR Close #59468
    9b7cb227