Ambient enums
Ambient enums are used to describe the shape of already existing enum types.
1 2 3 4 5 | declare enum Enum { A = 1, B, C = 2 } |
One important difference between ambient and non-ambient enums is that, in regular enums, members that don’t have an initializer are considered constant members. For non-const ambient enums member that does not have initializer is considered computed.
Please login to continue.