type-fest icon indicating copy to clipboard operation
type-fest copied to clipboard

SetRequiredDeep - is it possible?

Open Hatgor opened this issue 1 year ago • 1 comments

Hello there!

Could anyone please advise if I can combine existing methods to achieve the following:

type Example = { a: string; b?: number; c: { ca: number; cb?: string; }; };

type ExampleWithRequired = SetRequiredDeep<Example, 'b' | 'c.cb'>;

I've tried to slightly modify SetRequired on my own, but it didn't work as expected:

image image

Is it possible at all?

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • The funding will be given to active contributors.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

Hatgor avatar Jan 16 '24 19:01 Hatgor

I think this can be a good feature.

Emiyaaaaa avatar Jan 17 '24 09:01 Emiyaaaaa