const font: Font = {
color: "red",
size: 16,
};
const background: Background = {
color: "red",
url: "",
};
const style:Style = {
...font,
...background,
};
//----------------------//
type Font = {
color: string;
size: number;
};
type Background = {
color: string;
url: string;
};
interface Style {
// Font
// Background
}
请问上面这个小例子里面 style 类型应该怎么写呀,查了下感觉姿势不对没查到……