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 合併指標
 (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.

貢獻者指南