Type alias ValueOf<Input>

ValueOf<Input>: Input[KeyOf<Input> & keyof Input]

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 a Record).

Example

const object = {
"🟢": 1,
"🟩": 2,
};
const key: ValueOf<typeof object> = 1;

See

ReadOnlyCollection

Type Parameters