2021-05-19から1日間の記事一覧
keyofについて keyofにオブジェクトを指定すると、そのオブジェクトのいずれかのキー(プロパティ名)を許容するUnion Typeが返却される interface SampleInterface { a: string; b: number; c: boolean; } type Keys = keyof SampleInterface; const aKey: …
keyofについて keyofにオブジェクトを指定すると、そのオブジェクトのいずれかのキー(プロパティ名)を許容するUnion Typeが返却される interface SampleInterface { a: string; b: number; c: boolean; } type Keys = keyof SampleInterface; const aKey: …