@material-ui/types
Advanced tools
Comparing version 5.0.1 to 5.1.0
@@ -42,2 +42,13 @@ import * as React from 'react'; | ||
/** | ||
* Generate a set of string literal types with the given default record `T` and | ||
* override record `U`. | ||
* | ||
* If the property value was `true`, the property key will be added to the | ||
* string union. | ||
* | ||
* @internal | ||
*/ | ||
export type OverridableStringUnion<T, U = {}> = GenerateStringUnion<Overwrite<T, U>>; | ||
/** | ||
* Like `T & U`, but using the value types from `U` where their properties overlap. | ||
@@ -48,1 +59,8 @@ * | ||
export type Overwrite<T, U> = Omit<T, keyof U> & U; | ||
type GenerateStringUnion<T> = Extract< | ||
{ | ||
[Key in keyof T]: true extends T[Key] ? Key : never; | ||
}[keyof T], | ||
string | ||
>; |
{ | ||
"name": "@material-ui/types", | ||
"version": "5.0.1", | ||
"version": "5.1.0", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "author": "Material-UI Team", |
2904
57