2

Whenever I run my Angular 4 app that calls an enum like this one...

export declare enum RemoteStatus {
    REMOTE = "REMOTE",
    ACTIVATING = "ACTIVATING",
    ACTIVE = "ACTIVE",
    DEACTIVATING = "DEACTIVATING",
    INACTIVE = "INACTIVE",
}
export declare enum Status {
    UNKNOWN = "UNKNOWN",
    LOCKED = "LOCKED",
    UNLOCKED = "UNLOCKED",
}

It gives me an error on the ng serve console.

ERROR in D:/Projects/nem-swiftbc-app/node_modules/nem-library/dist/src/models/account/AccountInfo.d.ts (4,14): In ambient enum declarations member initializer must be constant expression.

ERROR in D:/Projects/nem-swiftbc-app/node_modules/nem-library/dist/src/models/account/AccountInfo.d.ts (5,18): In ambient enum declarations member initializer must be constant expression.

This prevents the app from loading. Any clue as to how can this be resolved?

Alvin Reyes
  • 710
  • 1
  • 8
  • 24

1 Answers1

0

I managed to resolved this by updating my typescript version.

npm install -g typescript@latest
Alvin Reyes
  • 710
  • 1
  • 8
  • 24