https://twitter.com/larymagal/status/1021741263358443520
As a more basic example:
declare function bar(): string
enum E {
foo = bar();
}
Currently we give the error
Type 'string' is not assignable to type 'E'.
However, we should give an error like
Only numeric enums can have computed members, but this expression has type 'string'.
If you do not need exhaustiveness checks, consider using an object literal instead.
https://twitter.com/larymagal/status/1021741263358443520
As a more basic example:
Currently we give the error
However, we should give an error like