a utility type that mirrors a type T, in addition to enclosing the object T under the composition property key P.
T
P
this utility type is used by the functions mirrorObjectThroughComposition and subclassThroughComposition.
const obj_a = { hello: "world", goodbye: "earth", answer() { return 42 },}const obj_b = { _super: obj_a, // composing/enclosing `obj_a` ...obj_a, // mirroring the methods and properties of `obj_a`}obj_b satisfies MirrorComposition<typeof obj_a, "_super"> Copy
const obj_a = { hello: "world", goodbye: "earth", answer() { return 42 },}const obj_b = { _super: obj_a, // composing/enclosing `obj_a` ...obj_a, // mirroring the methods and properties of `obj_a`}obj_b satisfies MirrorComposition<typeof obj_a, "_super">
a utility type that mirrors a type
T
, in addition to enclosing the objectT
under the composition property keyP
.this utility type is used by the functions mirrorObjectThroughComposition and subclassThroughComposition.