Skip to content

Commit

Permalink
[material-ui] Change React.ReactElement type from any to unknown (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sai6855 committed Jun 6, 2024
1 parent d60a136 commit ef90bce
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions packages/mui-material/src/Chip/Chip.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface ChipOwnProps {
/**
* The Avatar element to display.
*/
avatar?: React.ReactElement<any>;
avatar?: React.ReactElement<unknown>;
/**
* This prop isn't supported.
* Use the `component` prop if you need to change the children structure.
Expand Down Expand Up @@ -47,7 +47,7 @@ export interface ChipOwnProps {
/**
* Override the default delete icon element. Shown only if `onDelete` is set.
*/
deleteIcon?: React.ReactElement<any>;
deleteIcon?: React.ReactElement<unknown>;
/**
* If `true`, the component is disabled.
* @default false
Expand All @@ -56,7 +56,7 @@ export interface ChipOwnProps {
/**
* Icon element.
*/
icon?: React.ReactElement<any>;
icon?: React.ReactElement<unknown>;
/**
* The content of the component.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/GlobalStyles/GlobalStyles.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ export interface GlobalStylesProps {
*
* - [GlobalStyles API](https://mui.com/material-ui/api/global-styles/)
*/
export default function GlobalStyles(props: GlobalStylesProps): React.ReactElement<any>;
export default function GlobalStyles(props: GlobalStylesProps): React.ReactElement<unknown>;
2 changes: 1 addition & 1 deletion packages/mui-material/src/Modal/Modal.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface ModalOwnProps {
/**
* A single child content element.
*/
children: React.ReactElement<any>;
children: React.ReactElement<unknown>;
/**
* Override or extend the styles applied to the component.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Slider/Slider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ export interface SliderTypeMap<
}

export interface SliderValueLabelProps extends React.HTMLAttributes<HTMLSpanElement> {
children: React.ReactElement<any>;
children: React.ReactElement<unknown>;
index: number;
open: boolean;
value: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/StepConnector/StepConnector.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { InternalStandardProps as StandardProps } from '..';
import { Theme } from '../styles';
import { StepConnectorClasses } from './stepConnectorClasses';

export type StepConnectorIcon = React.ReactElement<any> | string | number;
export type StepConnectorIcon = React.ReactElement<unknown> | string | number;

export interface StepConnectorProps
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, 'children'> {
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Tab/Tab.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface TabOwnProps {
/**
* The icon to display.
*/
icon?: string | React.ReactElement<any>;
icon?: string | React.ReactElement<unknown>;
/**
* The position of the icon relative to the label.
* @default 'top'
Expand Down

0 comments on commit ef90bce

Please sign in to comment.