Skip to content

Commit

Permalink
types(shared): Improve LooseRequired<T>
Browse files Browse the repository at this point in the history
Improve the implementation of `LooseRequired<T>`.
  • Loading branch information
browsnet authored Jul 9, 2022
1 parent 8dcb6c7 commit 489df2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/shared/src/typeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export type UnionToIntersection<U> = (
: never

// make keys required but keep undefined values
export type LooseRequired<T> = { [P in string & keyof T]: T[P] }
export type LooseRequired<T> = { [P in keyof Required<T>]: T[P] }

// If the the type T accepts type "any", output type Y, otherwise output type N.
// https://stackoverflow.com/questions/49927523/disallow-call-with-any/49928360#49928360
Expand Down

0 comments on commit 489df2e

Please sign in to comment.