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

Proposal: `ValueOfDeep<Type, 'key.deepKey'>`

Open joaomarcelofm opened this issue 5 months ago • 1 comments

Short summary

Given: Type: Any type

Provide: Create a type based on the ValueOf of a deeply nested property.

Potential definition

type ValueOfDeep<Type, PathUnion extends Paths<T>>

Use case

Selecting deeply nested objects to be the value of a new type. This may be relevant for auto-generated types where the deep objects aren't unique types but are used independently on the application.

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

joaomarcelofm avatar Mar 01 '24 07:03 joaomarcelofm

Accepted

https://github.com/sindresorhus/type-fest/blob/main/.github/contributing.md#submitting-a-new-type

sindresorhus avatar Mar 02 '24 06:03 sindresorhus