Deeply inject properties into an object tree.
Target object type
Injected type
1.1.0
Injects properties from type D into every nested object within T. Handles arrays and readonly arrays by injecting into their element types.
Properties in T are never overwritten by properties from D.
type Nested = { level_1: { level_2: { } } };type Metadata = { metadata?: string };type DeepIntersected = DeepIntersection< Nested, Metadata >;// { level_1: { level_2: { metadata?: string }, metadata?: string }, metadata?: string } Copy
type Nested = { level_1: { level_2: { } } };type Metadata = { metadata?: string };type DeepIntersected = DeepIntersection< Nested, Metadata >;// { level_1: { level_2: { metadata?: string }, metadata?: string }, metadata?: string }
Deeply inject properties into an object tree.