sindresorhus/type-fest

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

Aberta

#822 aberto em 1 de mar. de 2024

 (2 comentários) (5 reações) (0 responsável)TypeScript (471 forks)batch import
component:pathshelp wantedtype addition

Métricas do repositório

Stars
 (12.328 estrelas)
Métricas de merge de PR
 (Mesclagem média 3d 5h) (11 fundiu PRs em 30d)

Description

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.

Guia do colaborador