Skip to content

Commit

Permalink
fix after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Harris-Miller committed Oct 8, 2023
1 parent 3439749 commit 8c36fba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions types/util/tools.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ export type WidenLiterals<T> =
* Alias for the common result type for the `assoc` function
*/
export type AssocResults<K extends PropertyKey, T, U> = U extends Record<K, any> ? T extends U[K] ? U : Omit<U, K> & Record<K, T> : Omit<U, K> & Record<K, T>;

/**
* Extract the types from an array
* Works with Tuples, eg `ElementOf<typeof ['p1', 'p2']>` => `'p1' | 'p2'`
Expand Down

0 comments on commit 8c36fba

Please sign in to comment.