This seems so trivial, yet I am not understanding why this isn't working. Since I am just concatinating/adding depending on a number or string, the return type should match.
function M<T>(arg: T): T {
return arg + arg;
}
M(3) // 6
M('bill') // billbill
const a = M<number>(3); // a will be a number,const b = M<string>('bill');// b will be a string