app-config icon indicating copy to clipboard operation
app-config copied to clipboard

Find better ergonomics for accessing TypeScript enums from generated types

Open joelgallant opened this issue 3 years ago • 0 comments

Generated enums aren't accessible by code because they're embedded in type files, which aren't usually imported directly.

Convert:

export enum MyType {
  Bar = 'bar',
  Baz = 'baz',
  Foo = 'foo',
}

Into:

export type MyType = 'bar' | 'baz' | 'foo';

joelgallant avatar Apr 03 '21 16:04 joelgallant