Warning
Enums will turn into runtime code; This has implications when running in node.
https://youtu.be/dh6BCSzaF6g?t=1419
const Foo = {
FAILD = 'failed',
SUCCESS = 'success'
} as const;
type Bar = typeof Foo;
type barKeys = keyof Bar;
typeof BarValues = Bar[BarKeys];
const x = (f: BarKeys) => f;
x('FAILED');
const y = (f: BarValues) => f;
y('failed');