Skip to content

Commit 368de42

Browse files
committed
refactor: rename Values type to ObjectValues and update documentation
BREAKING CHANGE: The type alias `Values` has been renamed to `ObjectValues` for better alignment with the TypeScript ecosystem. Update all references
1 parent a154220 commit 368de42

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/type-helper/types.d.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,13 @@ declare global {
175175
type Prop<T, K> = K extends keyof T ? T[K] : never;
176176

177177
/**
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.
178+
* Gets a union of all value types in an object.
179+
* @template T The object type.
180+
* @example
181+
* type Config = { host: string; port: number; };
182+
* type ConfigValues = ObjectValues<Config>; // string | number
181183
*/
182-
type Values<T> = T[keyof T];
184+
type ObjectValues<T> = T[keyof T];
183185

184186
/**
185187
* Extracts the type of individual items in an array.

0 commit comments

Comments
 (0)