how to clone object by type in typescript? i try Object assign, deconstructing, spreading, etc...
type A = {a: string} // not only 'a', more complex
type B = {b: string} // not only 'b', more complex
type C = A & B
const c = {a: 'a', b: 'b'} // not only 'a' and 'b', more complex
/** try **/
// Object.assign({}, c as A)
// copyA = {a: 'a', b: 'b'}
/** how to copy type-safe? like this. **/
// copyA = customCopy<A>(c);
// copyA = {a: 'a'}