Skip to content

Commit fdc005b

Browse files
sai6855aarongarciah
authored andcommitted
[material-ui] Change React.ReactElement<any,any> type from any to unknown (mui#43358)
1 parent f9a0759 commit fdc005b

File tree

16 files changed

+20
-20
lines changed

16 files changed

+20
-20
lines changed

packages/mui-material/src/Accordion/Accordion.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export interface AccordionSlots {
1919
* @default Collapse
2020
*/
2121
transition?: React.JSXElementConstructor<
22-
TransitionProps & { children?: React.ReactElement<any, any> }
22+
TransitionProps & { children?: React.ReactElement<unknown, any> }
2323
>;
2424
}
2525

@@ -92,7 +92,7 @@ export type AccordionTypeMap<
9292
* [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
9393
*/
9494
TransitionComponent?: React.JSXElementConstructor<
95-
TransitionProps & { children?: React.ReactElement<any, any> }
95+
TransitionProps & { children?: React.ReactElement<unknown, any> }
9696
>;
9797
/**
9898
* Props applied to the transition element.

packages/mui-material/src/Backdrop/Backdrop.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export interface BackdropSlots {
1919
* @default Fade
2020
*/
2121
transition?: React.JSXElementConstructor<
22-
TransitionProps & { children: React.ReactElement<any, any> }
22+
TransitionProps & { children: React.ReactElement<unknown, any> }
2323
>;
2424
}
2525
export interface BackdropComponentsPropsOverrides {}
@@ -100,7 +100,7 @@ export interface BackdropOwnProps
100100
*/
101101
TransitionComponent?: React.JSXElementConstructor<
102102
TransitionProps & {
103-
children: React.ReactElement<any, any>;
103+
children: React.ReactElement<unknown, any>;
104104
}
105105
>;
106106
}

packages/mui-material/src/Dialog/Dialog.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export interface DialogProps extends StandardProps<ModalProps, 'children'> {
8888
* @default Fade
8989
*/
9090
TransitionComponent?: React.JSXElementConstructor<
91-
TransitionProps & { children: React.ReactElement<any, any> }
91+
TransitionProps & { children: React.ReactElement<unknown, any> }
9292
>;
9393
/**
9494
* The duration for the transition, in milliseconds.

packages/mui-material/src/Fade/Fade.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface FadeProps extends Omit<TransitionProps, 'children'> {
1111
/**
1212
* A single child content element.
1313
*/
14-
children: React.ReactElement<any, any>;
14+
children: React.ReactElement<unknown, any>;
1515
/**
1616
* The transition timing function.
1717
* You may specify a single easing or a object containing enter and exit values.

packages/mui-material/src/FormControlLabel/FormControlLabel.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export interface FormControlLabelProps
4848
/**
4949
* A control element. For instance, it can be a `Radio`, a `Switch` or a `Checkbox`.
5050
*/
51-
control: React.ReactElement<any, any>;
51+
control: React.ReactElement<unknown, any>;
5252
/**
5353
* If `true`, the control is disabled.
5454
*/

packages/mui-material/src/Grow/Grow.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface GrowProps extends Omit<TransitionProps, 'timeout'> {
1111
/**
1212
* A single child content element.
1313
*/
14-
children: React.ReactElement<any, any>;
14+
children: React.ReactElement<unknown, any>;
1515
/**
1616
* The transition timing function.
1717
* You may specify a single easing or a object containing enter and exit values.

packages/mui-material/src/NativeSelect/NativeSelect.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export interface NativeSelectProps
2626
* An `Input` element; does not have to be a material-ui specific `Input`.
2727
* @default <Input />
2828
*/
29-
input?: React.ReactElement<any, any>;
29+
input?: React.ReactElement<unknown, any>;
3030
/**
3131
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attributes) applied to the `select` element.
3232
*/

packages/mui-material/src/Popover/Popover.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export interface PopoverProps
146146
* @default Grow
147147
*/
148148
TransitionComponent?: React.JSXElementConstructor<
149-
TransitionProps & { children: React.ReactElement<any, any> }
149+
TransitionProps & { children: React.ReactElement<unknown, any> }
150150
>;
151151
/**
152152
* Set to 'auto' to automatically calculate transition time based on height.

packages/mui-material/src/Select/Select.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export interface BaseSelectProps<Value = unknown>
6363
/**
6464
* An `Input` element; does not have to be a material-ui specific `Input`.
6565
*/
66-
input?: React.ReactElement<any, any>;
66+
input?: React.ReactElement<unknown, any>;
6767
/**
6868
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
6969
* When `native` is `true`, the attributes are applied on the `select` element.

packages/mui-material/src/Slide/Slide.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface SlideProps extends TransitionProps {
1111
/**
1212
* A single child content element.
1313
*/
14-
children: React.ReactElement<any, any>;
14+
children: React.ReactElement<unknown, any>;
1515
/**
1616
* An HTML element, or a function that returns one.
1717
* It's used to set the container the Slide is transitioning from.

0 commit comments

Comments
 (0)