F.e。,基于the docs,我执行了以下类似操作,以便将自己的属性添加到Theme中以制作自己的样式主题:
declare module "@material-ui/core/styles/createMuiTheme" {
interface Theme {
dimensions: ThemeDimentions
focus: CSSProperties
listItem: CSSProperties
}
interface ThemeOptions {
dimensions: ThemeDimentions
focus: CSSProperties
listItem: CSSProperties
}
}
但是如您所见,存在重复。我们如何才能避免重复并使事物保持干燥?