Type Alias: WrapPropertyType<TKey, TProperty>

WrapPropertyType<TKey, TProperty>: TKey extends `${infer TFirst}.${infer TRest}` ? { [K in TFirst]: WrapPropertyType<TRest, TProperty> } : { [K in TKey]: TProperty }

Type Parameters

TKey extends string

TProperty

Example

type C = { c: string } type A = WrapPropertyType<"a", C> // { a: C } type B = WrapPropertyType<"a.b", C> // { a: { b: C } }

Defined in

packages/core/src/utils/types.ts:32