Generic key for either object or array.
This type is used to get the type of the values in a collection (items of an ArrayLike or properties of a Record).
ArrayLike
Record
const object = { "🟢": 1, "🟩": 2,};const key: ValueOf<typeof object> = 1; Copy
const object = { "🟢": 1, "🟩": 2,};const key: ValueOf<typeof object> = 1;
ReadOnlyCollection
Type of the collection.
Generic key for either object or array.
Remarks
This type is used to get the type of the values in a collection (items of an
ArrayLike
or properties of aRecord
).Example
See
ReadOnlyCollection