Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[material-ui] Change React.ReactElement<any,any> type from any to unknown #43358

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/mui-material/src/Accordion/Accordion.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface AccordionSlots {
* @default Collapse
*/
transition?: React.JSXElementConstructor<
TransitionProps & { children?: React.ReactElement<any, any> }
TransitionProps & { children?: React.ReactElement<unknown, any> }
>;
}

Expand Down Expand Up @@ -92,7 +92,7 @@ export type AccordionTypeMap<
* [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
*/
TransitionComponent?: React.JSXElementConstructor<
TransitionProps & { children?: React.ReactElement<any, any> }
TransitionProps & { children?: React.ReactElement<unknown, any> }
>;
/**
* Props applied to the transition element.
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-material/src/Backdrop/Backdrop.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface BackdropSlots {
* @default Fade
*/
transition?: React.JSXElementConstructor<
TransitionProps & { children: React.ReactElement<any, any> }
TransitionProps & { children: React.ReactElement<unknown, any> }
>;
}
export interface BackdropComponentsPropsOverrides {}
Expand Down Expand Up @@ -100,7 +100,7 @@ export interface BackdropOwnProps
*/
TransitionComponent?: React.JSXElementConstructor<
TransitionProps & {
children: React.ReactElement<any, any>;
children: React.ReactElement<unknown, any>;
}
>;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Dialog/Dialog.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export interface DialogProps extends StandardProps<ModalProps, 'children'> {
* @default Fade
*/
TransitionComponent?: React.JSXElementConstructor<
TransitionProps & { children: React.ReactElement<any, any> }
TransitionProps & { children: React.ReactElement<unknown, any> }
>;
/**
* The duration for the transition, in milliseconds.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Fade/Fade.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface FadeProps extends Omit<TransitionProps, 'children'> {
/**
* A single child content element.
*/
children: React.ReactElement<any, any>;
children: React.ReactElement<unknown, any>;
/**
* The transition timing function.
* You may specify a single easing or a object containing enter and exit values.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export interface FormControlLabelProps
/**
* A control element. For instance, it can be a `Radio`, a `Switch` or a `Checkbox`.
*/
control: React.ReactElement<any, any>;
control: React.ReactElement<unknown, any>;
/**
* If `true`, the control is disabled.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Grow/Grow.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface GrowProps extends Omit<TransitionProps, 'timeout'> {
/**
* A single child content element.
*/
children: React.ReactElement<any, any>;
children: React.ReactElement<unknown, any>;
/**
* The transition timing function.
* You may specify a single easing or a object containing enter and exit values.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/NativeSelect/NativeSelect.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface NativeSelectProps
* An `Input` element; does not have to be a material-ui specific `Input`.
* @default <Input />
*/
input?: React.ReactElement<any, any>;
input?: React.ReactElement<unknown, any>;
/**
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attributes) applied to the `select` element.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Popover/Popover.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export interface PopoverProps
* @default Grow
*/
TransitionComponent?: React.JSXElementConstructor<
TransitionProps & { children: React.ReactElement<any, any> }
TransitionProps & { children: React.ReactElement<unknown, any> }
>;
/**
* Set to 'auto' to automatically calculate transition time based on height.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Select/Select.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export interface BaseSelectProps<Value = unknown>
/**
* An `Input` element; does not have to be a material-ui specific `Input`.
*/
input?: React.ReactElement<any, any>;
input?: React.ReactElement<unknown, any>;
/**
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
* When `native` is `true`, the attributes are applied on the `select` element.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Slide/Slide.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface SlideProps extends TransitionProps {
/**
* A single child content element.
*/
children: React.ReactElement<any, any>;
children: React.ReactElement<unknown, any>;
/**
* An HTML element, or a function that returns one.
* It's used to set the container the Slide is transitioning from.
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-material/src/Snackbar/Snackbar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface SnackbarProps extends StandardProps<React.HTMLAttributes<HTMLDi
/**
* Replace the `SnackbarContent` component.
*/
children?: React.ReactElement<any, any>;
children?: React.ReactElement<unknown, any>;
/**
* Override or extend the styles applied to the component.
*/
Expand Down Expand Up @@ -98,7 +98,7 @@ export interface SnackbarProps extends StandardProps<React.HTMLAttributes<HTMLDi
* @default Grow
*/
TransitionComponent?: React.JSXElementConstructor<
TransitionProps & { children: React.ReactElement<any, any> }
TransitionProps & { children: React.ReactElement<unknown, any> }
>;
/**
* The duration for the transition, in milliseconds.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/SpeedDial/SpeedDial.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface SpeedDialSlots {
* @default {}
*/
transition?: React.JSXElementConstructor<
TransitionProps & { children: React.ReactElement<any, any> }
TransitionProps & { children: React.ReactElement<unknown, any> }
>;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/StepContent/StepContent.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface StepContentProps extends StandardProps<React.HTMLAttributes<HTM
* @default Collapse
*/
TransitionComponent?: React.JSXElementConstructor<
TransitionProps & { children: React.ReactElement<any, any> }
TransitionProps & { children: React.ReactElement<unknown, any> }
>;
/**
* Adjust the duration of the content expand transition.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Stepper/Stepper.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface StepperOwnProps extends Pick<PaperProps, 'elevation' | 'square'
* An element to be placed between each step.
* @default <StepConnector />
*/
connector?: React.ReactElement<any, any> | null;
connector?: React.ReactElement<unknown, any> | null;
/**
* If set the `Stepper` will not assist in controlling steps for linear flow.
* @default false
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-material/src/Tooltip/Tooltip.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface TooltipProps extends StandardProps<React.HTMLAttributes<HTMLDiv
/**
* Tooltip reference element.
*/
children: React.ReactElement<any, any>;
children: React.ReactElement<unknown, any>;
/**
* Override or extend the styles applied to the component.
*/
Expand Down Expand Up @@ -204,7 +204,7 @@ export interface TooltipProps extends StandardProps<React.HTMLAttributes<HTMLDiv
* @default Grow
*/
TransitionComponent?: React.JSXElementConstructor<
TransitionProps & { children: React.ReactElement<any, any> }
TransitionProps & { children: React.ReactElement<unknown, any> }
>;
/**
* Props applied to the transition element.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Zoom/Zoom.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface ZoomProps extends TransitionProps {
/**
* A single child content element.
*/
children: React.ReactElement<any, any>;
children: React.ReactElement<unknown, any>;
/**
* The transition timing function.
* You may specify a single easing or a object containing enter and exit values.
Expand Down
Loading