From e430fcc5d5e54d56d43a463837c507c1815e5dd7 Mon Sep 17 00:00:00 2001 From: Yonatan R Date: Thu, 3 Oct 2024 10:57:26 +0300 Subject: [PATCH] [system] Add empty interfaces to fix issue with typescript module augmentation (#43873) --- .../src/createTheme/createTheme.d.ts | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/packages/mui-system/src/createTheme/createTheme.d.ts b/packages/mui-system/src/createTheme/createTheme.d.ts index 66eea69f4ba8c4..0f31129b72d4e2 100644 --- a/packages/mui-system/src/createTheme/createTheme.d.ts +++ b/packages/mui-system/src/createTheme/createTheme.d.ts @@ -14,18 +14,24 @@ export { export type Direction = 'ltr' | 'rtl'; +export interface Typography {} +export interface Mixins {} +export interface Shadows {} +export interface Transitions {} +export interface ZIndex {} + export interface ThemeOptions { shape?: ShapeOptions; breakpoints?: BreakpointsOptions; direction?: Direction; - mixins?: unknown; + mixins?: Mixins; palette?: Record; - shadows?: unknown; + shadows?: Shadows; spacing?: SpacingOptions; - transitions?: unknown; + transitions?: Transitions; components?: Record; - typography?: unknown; - zIndex?: Record; + typography?: Typography; + zIndex?: ZIndex; unstable_sxConfig?: SxConfig; } @@ -34,13 +40,13 @@ export interface Theme extends CssContainerQueries { breakpoints: Breakpoints; direction: Direction; palette: Record & { mode: 'light' | 'dark' }; - shadows?: unknown; + shadows?: Shadows; spacing: Spacing; - transitions?: unknown; + transitions?: Transitions; components?: Record; - mixins?: unknown; - typography?: unknown; - zIndex?: unknown; + mixins?: Mixins; + typography?: Typography; + zIndex?: ZIndex; applyStyles: ApplyStyles<'light' | 'dark'>; unstable_sxConfig: SxConfig; unstable_sx: (props: SxProps) => CSSObject;