sindresorhus/type-fest

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

Offen

#822 geöffnet am 01.03.2024

 (2 Kommentare) (5 Reaktionen) (0 zugewiesene Personen)TypeScript (471 Forks)batch import
component:pathshelp wantedtype addition

Repository-Metriken

Stars
 (12.328 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 3T 5h) (11 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide