面试题答案
一键面试interface A {
a: string;
}
interface B {
b: number;
}
function combine<T extends A, U extends B>(t: T, u: U): { a: string; b: number } {
return {
a: t.a.toUpperCase(),
b: u.b * 2
};
}
interface A {
a: string;
}
interface B {
b: number;
}
function combine<T extends A, U extends B>(t: T, u: U): { a: string; b: number } {
return {
a: t.a.toUpperCase(),
b: u.b * 2
};
}