Skip to content

Commit

Permalink
feat(types): add type ValueOf
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoPedroAS51 committed Jan 7, 2021
1 parent 3dc1391 commit b951300
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ export type ItemOrDefault<Item extends ItemData = ItemData, D = null> =
| D
| null
export type DefaultValue<D = null> = D | (() => D) | null
export type ValueOf<T, V extends keyof T = keyof T> = T[V]

0 comments on commit b951300

Please sign in to comment.