Type alias NestedReplace<T, TPath, TValue>
NestedReplace<T, TPath, TValue>: TPath extends keyof T ? { [K in keyof T]: K extends TPath ? TValue : T[K] } : TPath extends `${infer Head}.${infer Tail}` ? Head extends keyof T ? { [K in keyof T]: K extends Head ? NestedReplace<T[K], Tail extends Paths<T[K]> ? Tail : never, TValue> : T[K] } : never : never Type Parameters
T
TPath extends Paths<T>
TValue
Replaces the value at the specified path in the object type T with the provided value.