@material-ui/types
Advanced tools
Comparing version 4.1.0 to 4.1.1
@@ -0,1 +1,3 @@ | ||
import * as React from 'react'; | ||
// disable automatic export | ||
@@ -56,1 +58,33 @@ export {}; | ||
export type CoerceEmptyInterface<T> = IsAny<T> extends true ? {} : T; | ||
export type Or<A, B, C = false> = A extends true | ||
? true | ||
: B extends true | ||
? true | ||
: C extends true | ||
? true | ||
: false; | ||
export type And<A, B, C = true> = A extends true | ||
? B extends true | ||
? C extends true | ||
? true | ||
: false | ||
: false | ||
: false; | ||
/** | ||
* @internal | ||
* | ||
* check if a type is `{}` | ||
* | ||
* 1. false if the given type has any members | ||
* 2. false if the type is `object` which is the only other type with no members | ||
* {} is a top type so e.g. `string extends {}` but not `string extends object` | ||
* 3. false if the given type is `unknown` | ||
*/ | ||
export type IsEmptyInterface<T> = And< | ||
keyof T extends never ? true : false, | ||
string extends T ? true : false, | ||
unknown extends T ? false : true | ||
>; |
{ | ||
"name": "@material-ui/types", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"private": false, | ||
@@ -36,3 +36,6 @@ "author": "Material-UI Team", | ||
"access": "public" | ||
}, | ||
"dependencies": { | ||
"@types/react": "*" | ||
} | ||
} |
3435
79
1
+ Added@types/react@*
+ Added@types/react@19.0.7(transitive)
+ Addedcsstype@3.1.3(transitive)