@mui/types 7.1.1 → 7.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +1255 -38
  2. package/index.d.ts +8 -1
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -67,7 +67,7 @@ type GenerateStringUnion<T> = Extract<
67
67
  >;
68
68
 
69
69
  // https://stackoverflow.com/questions/53807517/how-to-test-if-two-types-are-exactly-the-same
70
- type IfEquals<T, U, Y = unknown, N = never> = (<G>() => G extends T ? 1 : 2) extends <
70
+ export type IfEquals<T, U, Y = unknown, N = never> = (<G>() => G extends T ? 1 : 2) extends <
71
71
  G,
72
72
  >() => G extends U ? 1 : 2
73
73
  ? Y
@@ -135,3 +135,10 @@ export interface OverridableTypeMap {
135
135
  props: {};
136
136
  defaultComponent: React.ElementType;
137
137
  }
138
+
139
+ /**
140
+ * Simplifies the display of a type (without modifying it).
141
+ * Taken from https://effectivetypescript.com/2022/02/25/gentips-4-display/
142
+ */
143
+ // tslint:disable-next-line: ban-types
144
+ export type Simplify<T> = T extends Function ? T : { [K in keyof T]: T[K] };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/types",
3
- "version": "7.1.1",
3
+ "version": "7.1.4",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "Utility types for MUI.",