sindresorhus/type-fest

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

开放

#822 创建于 2024年3月1日

 (2 条评论) (5 个反应) (0 位负责人)TypeScript (471 个派生)batch import
component:pathshelp wantedtype addition

仓库指标

星标
 (12,328 个星标)
PR 合并指标
 (平均合并 3天 5小时) (30 天内合并 11 个 PR)

描述

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.

贡献者指南