- 配列の型から要素の型を取り出す。
type Item = Items[number]
-
ReadonlyArray
とas const
*
const a: ReadonlyArray<string> = ['a', 'b', 'c'];
const b: ReadonlyArray<string> = ['a', 'b', 'c'];
type Item = Items[number]
ReadonlyArray
とas const
*
const a: ReadonlyArray<string> = ['a', 'b', 'c'];
const b: ReadonlyArray<string> = ['a', 'b', 'c'];