HackerTrans
TopNewTrendsCommentsPastAskShowJobs

maxpowa

no profile record

comments

maxpowa
·3 tahun yang lalu·discuss
WRT Enum as key in object:

  enum TestEnum {
    Fizz = 0,
    Buzz,
    Bar,
    Baz
  }

  type EnumKeyedObject = Record<TestEnum, string>;

  type EnumKeyedObjectAlt = { [P in TestEnum]: string };