Type alias Vals<T>

Vals<T>: T[Keys<T>]

Represents the union type of values of properties in a given type T. This type alias Vals<T> retrieves the union type of values corresponding to the keys (property names) of type T.

Type Parameters

  • T

Example

type Person = {
name: string;
age: number;
email: string;
};

type PersonValues = Vals<Person>; => string | number