@mui/types 7.2.13 → 7.2.14-dev.20240529-082515-213b5e33ab
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.
|
@@ -15,8 +15,8 @@ declare module '@mui/types' {
|
|
|
15
15
|
*/
|
|
16
16
|
component: C;
|
|
17
17
|
} & OverridePropsVer2<M, C>,
|
|
18
|
-
): JSX.Element;
|
|
19
|
-
(props: DefaultComponentPropsVer2<M>): JSX.Element;
|
|
18
|
+
): React.JSX.Element;
|
|
19
|
+
(props: DefaultComponentPropsVer2<M>): React.JSX.Element;
|
|
20
20
|
propTypes?: any;
|
|
21
21
|
}
|
|
22
22
|
|
package/index.d.ts
CHANGED
|
@@ -27,7 +27,10 @@ export type PropInjector<InjectedProps, AdditionalProps = {}> = <
|
|
|
27
27
|
>(
|
|
28
28
|
component: C,
|
|
29
29
|
) => React.JSXElementConstructor<
|
|
30
|
-
DistributiveOmit<
|
|
30
|
+
DistributiveOmit<
|
|
31
|
+
React.JSX.LibraryManagedAttributes<C, React.ComponentProps<C>>,
|
|
32
|
+
keyof InjectedProps
|
|
33
|
+
> &
|
|
31
34
|
AdditionalProps
|
|
32
35
|
>;
|
|
33
36
|
|
|
@@ -67,11 +70,8 @@ type GenerateStringUnion<T> = Extract<
|
|
|
67
70
|
>;
|
|
68
71
|
|
|
69
72
|
// https://stackoverflow.com/questions/53807517/how-to-test-if-two-types-are-exactly-the-same
|
|
70
|
-
export type IfEquals<T, U, Y = unknown, N = never> =
|
|
71
|
-
G
|
|
72
|
-
>() => G extends U ? 1 : 2
|
|
73
|
-
? Y
|
|
74
|
-
: N;
|
|
73
|
+
export type IfEquals<T, U, Y = unknown, N = never> =
|
|
74
|
+
(<G>() => G extends T ? 1 : 2) extends <G>() => G extends U ? 1 : 2 ? Y : N;
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* Issues a type error if `Expected` is not identical to `Actual`.
|
|
@@ -95,7 +95,7 @@ export interface OverridableComponent<M extends OverridableTypeMap> {
|
|
|
95
95
|
// If you make any changes to this interface, please make sure to update the
|
|
96
96
|
// `OverridableComponent` type in `mui-material/src/OverridableComponent.d.ts` as well.
|
|
97
97
|
// Also, there are types in Base UI that have a similar shape to this interface
|
|
98
|
-
// (
|
|
98
|
+
// (for example SelectType, OptionType, etc.).
|
|
99
99
|
<C extends React.ElementType>(
|
|
100
100
|
props: {
|
|
101
101
|
/**
|
|
@@ -104,8 +104,8 @@ export interface OverridableComponent<M extends OverridableTypeMap> {
|
|
|
104
104
|
*/
|
|
105
105
|
component: C;
|
|
106
106
|
} & OverrideProps<M, C>,
|
|
107
|
-
): JSX.Element | null;
|
|
108
|
-
(props: DefaultComponentProps<M>): JSX.Element | null;
|
|
107
|
+
): React.JSX.Element | null;
|
|
108
|
+
(props: DefaultComponentProps<M>): React.JSX.Element | null;
|
|
109
109
|
propTypes?: any;
|
|
110
110
|
}
|
|
111
111
|
|