Skip to content

Build Optimizer is not wrapping some enums #14786

Closed
@filipesilva

Description

@filipesilva

The follow enum (present in RxJS):

export enum NotificationKind {
  NEXT = 'N',
  ERROR = 'E',
  COMPLETE = 'C',
}

Is transpiled by TS 3.5 to:

export var NotificationKind;
(function (NotificationKind) {
    NotificationKind["NEXT"] = "N";
    NotificationKind["ERROR"] = "E";
    NotificationKind["COMPLETE"] = "C";
})(NotificationKind || (NotificationKind = {}));

Running it through Build Optimizer leaves it unaltered, but it should be wrapped by https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_optimizer/src/transforms/wrap-enums.ts.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions