We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a154220 commit 368de42Copy full SHA for 368de42
packages/type-helper/types.d.ts
@@ -175,11 +175,13 @@ declare global {
175
type Prop<T, K> = K extends keyof T ? T[K] : never;
176
177
/**
178
- * Retrieves the union of all values in the given object type.
179
- * @typeparam T - The object type.
180
- * @returns The union of all values in the object type.
+ * Gets a union of all value types in an object.
+ * @template T The object type.
+ * @example
181
+ * type Config = { host: string; port: number; };
182
+ * type ConfigValues = ObjectValues<Config>; // string | number
183
*/
- type Values<T> = T[keyof T];
184
+ type ObjectValues<T> = T[keyof T];
185
186
187
* Extracts the type of individual items in an array.
0 commit comments