E0251: enum value must be a compile-time constant
In TypeScript, normal enums can contain computed values. However, enums declared
with const enum
, declare enum
, or declare const enum
must only contain
compile-time constants. It is an error to write a non-constant value in an enum
which requires constant values:
To fix this error, convert the enum member into a variable:
Alternatively, use a normal enum:
Introduced in quick-lint-js version 2.7.0.