TypeScript
配列からUnionTypesをつくる
code:ts
const keys =
'yes', 'no'
as const
type Key = typeof inJapanKeys
number
// 'yes' | 'no'
#typescript