diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-11-10 12:16:59 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-11 18:15:27 +0100 |
| commit | d7bcd93efcd4f1ae20678d0efa6777cfadc09a4e (patch) | |
| tree | 714edfa84a8f3c53262c407ac9a2a79c9d2479b8 /src/types | |
| parent | f699802b837d7d9fcf150ff2bf00cd3c5475c87a (diff) | |
refactor(components): replace Overview with ProjectOverview component
* `cover` prop is now expecting a ReactElement (NextImage)
* `meta` prop is now limited to a specific set of meta items
* add a `name` prop to add an accessible name to the figure element
Diffstat (limited to 'src/types')
| -rw-r--r-- | src/types/generics.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/types/generics.ts b/src/types/generics.ts index 5377c54..6fb4e1d 100644 --- a/src/types/generics.ts +++ b/src/types/generics.ts @@ -3,3 +3,10 @@ export type Maybe<T> = T | undefined; export type Nullable<T> = T | null; export type DataValidator<T> = (data: T) => boolean | Promise<boolean>; + +export type ValueOf< + T extends Record<string, unknown>, + K extends keyof T = keyof T, +> = { + [P in keyof T]: T[P]; +}[K]; |
