Skip to content

Commit

Permalink
types(shared): Improve LooseRequired<T> (vuejs#6244)
Browse files Browse the repository at this point in the history
  • Loading branch information
browsnet authored and chrislone committed Feb 4, 2023
1 parent feb1871 commit 16128e1
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 (T & 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 16128e1

Please sign in to comment.