Utility type to deep map all object properties to a given type, but optionally.
type Foo = { a: { b: { c: string; }; d: number; };};type Bar = DeepMap<Foo, number>;// Bar = {// a?: {// b?: {// c?: number;// };// d?: number;// };// }; Copy
type Foo = { a: { b: { c: string; }; d: number; };};type Bar = DeepMap<Foo, number>;// Bar = {// a?: {// b?: {// c?: number;// };// d?: number;// };// };
Generated using TypeDoc
Utility type to deep map all object properties to a given type, but optionally.