diff --git a/src/styles/createMuiTheme.d.ts b/src/styles/createMuiTheme.d.ts index c91e70da63ae7f..ba939af4b35cbf 100644 --- a/src/styles/createMuiTheme.d.ts +++ b/src/styles/createMuiTheme.d.ts @@ -24,5 +24,7 @@ export type Theme = { T; export default function createMuiTheme( - options?: Partial & T + options?: { + [K in keyof ThemeOptions]?: Partial + } & T ): Theme; diff --git a/test/typescript/styles.spec.tsx b/test/typescript/styles.spec.tsx index aa4924b617b5ea..bdf290dd00bf10 100644 --- a/test/typescript/styles.spec.tsx +++ b/test/typescript/styles.spec.tsx @@ -70,6 +70,12 @@ const theme = createMuiTheme({ }, }); +const customTheme = createMuiTheme({ + palette: { + type: 'dark' + } +}); + function OverridesTheme() { return (