Search Docs
WrapPropertyType<TKey, TProperty>: TKey extends `${infer TFirst}.${infer TRest}` ? { [K in TFirst]: WrapPropertyType<TRest, TProperty> } : { [K in TKey]: TProperty }
TKey
TProperty
{ [K in TFirst]: WrapPropertyType<TRest, TProperty> }
{ [K in TKey]: TProperty }
• TKey extends string
string
• TProperty
type C = { c: string } type A = WrapPropertyType<"a", C> // { a: C } type B = WrapPropertyType<"a.b", C> // { a: { b: C } }
packages/core/src/utils/types.ts:32