From 658cc943246eb58cd5ce9f4e9a649ac0d540ebb1 Mon Sep 17 00:00:00 2001 From: Konstantin Vasilev Date: Fri, 1 Jun 2018 16:00:59 +0300 Subject: [PATCH 1/2] fix keyof for ts 2.9 --- packages/material-ui/src/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/material-ui/src/index.d.ts b/packages/material-ui/src/index.d.ts index 34e8abd6fc864e..8e25ef13e8d368 100644 --- a/packages/material-ui/src/index.d.ts +++ b/packages/material-ui/src/index.d.ts @@ -7,7 +7,7 @@ export { StyledComponentProps }; * certain `classes`, on which one can also set a top-level `className` and inline * `style`. */ -export type StandardProps = Omit< +export type StandardProps = never> = Omit< C, 'classes' | Removals > & @@ -54,7 +54,7 @@ export type ConsistentWith = Pick; * * @internal */ -export type Overwrite = (U extends ConsistentWith ? T : Omit) & U; +export type Overwrite = (U extends ConsistentWith ? T : Omit>) & U; export namespace PropTypes { type Alignment = 'inherit' | 'left' | 'center' | 'right' | 'justify'; From 23f0584a0953ee47a3c2e7dacbafea22ebe87ebb Mon Sep 17 00:00:00 2001 From: Konstantin Vasilev Date: Fri, 1 Jun 2018 21:50:15 +0300 Subject: [PATCH 2/2] extends keyof any in omit --- packages/material-ui/src/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/material-ui/src/index.d.ts b/packages/material-ui/src/index.d.ts index 8e25ef13e8d368..eb2c7a9eed8bb4 100644 --- a/packages/material-ui/src/index.d.ts +++ b/packages/material-ui/src/index.d.ts @@ -7,7 +7,7 @@ export { StyledComponentProps }; * certain `classes`, on which one can also set a top-level `className` and inline * `style`. */ -export type StandardProps = never> = Omit< +export type StandardProps = Omit< C, 'classes' | Removals > & @@ -39,7 +39,7 @@ export interface Color { * * @internal */ -export type Omit = Pick>; +export type Omit = Pick>; /** * `T extends ConsistentWith` means that where `T` has overlapping properties with @@ -54,7 +54,7 @@ export type ConsistentWith = Pick; * * @internal */ -export type Overwrite = (U extends ConsistentWith ? T : Omit>) & U; +export type Overwrite = (U extends ConsistentWith ? T : Omit) & U; export namespace PropTypes { type Alignment = 'inherit' | 'left' | 'center' | 'right' | 'justify';