From 9a2a9d26d2861f62546339e7a5c59584b170b465 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Fri, 17 Jan 2020 12:22:29 +0100 Subject: [PATCH] [core] Fix TypographyStyle not allowing media queries and allowing unsafe undefined access #19269 --- packages/material-ui/src/styles/createTypography.d.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/material-ui/src/styles/createTypography.d.ts b/packages/material-ui/src/styles/createTypography.d.ts index da6760e23c631f..96191e64d841f4 100644 --- a/packages/material-ui/src/styles/createTypography.d.ts +++ b/packages/material-ui/src/styles/createTypography.d.ts @@ -31,12 +31,11 @@ export interface FontStyleOptions extends Partial { allVariants?: CSSProperties; } -export type TypographyStyle = Required< - Pick -> & - Partial>; - -export interface TypographyStyleOptions extends Partial {} +// TODO: which one should actually be allowed to be subject to module augmentation? +// current type vs interface decision is kept for historical reasons until we +// made a decision +export type TypographyStyle = CSSProperties; +export interface TypographyStyleOptions extends TypographyStyle {} export interface TypographyUtils { pxToRem: (px: number) => string;