@csepp you're right, switch-case doesn't really work with that, because its cases are supposed (?) to be literals of a certain type. Which restricts the usefulness of generic enums in their main use pattern.

I still think that generic enums would be useful for numeric computations as a type casting shortcut

enum Hello {
zero = 0.0,
one = 1.0,
e = 2.7,
pi = 3.14,
}

function whatever<T> (x: Hello<T>) {
switch(x) {
case Hello.zero:
return x + 8;
case Hello.one:
return x * 8;
case Hello.e:
return Math.pow(x, 3);
case Hello.e:
return Math.pow(x, 2) * 10;
}
}

Writing this, I realize that type casting doesn't really work in TS, with this (totally meaningful expression) still resulting in a float:

console.log((3.2 as unknown) as bigint);

So enum casting is actually not useful at all, and thus generic enums don't make sense. But that's not a problem of generic enums per se. It's a more general problem of TypeScript being both super restrictive and surprisingly fuzzy about types, to the point of absurd.