Skip to content

ValueOf

ValueOf<T> = T[keyof T]

Defined in: src/types/utilities.ts:36

Extracts the value type from a record/object

Type Parameters

T

T

Example

type Colors = { red: '#ff0000', blue: '#0000ff' }
type ColorValue = ValueOf<Colors> // '#ff0000' | '#0000ff'