Skip to content

Commit

Permalink
[typescript] Rescue missing backports v5 (#44712)
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoAndai authored Dec 10, 2024
1 parent 42aa0ce commit f4f1013
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/src/components/markdown/MarkdownElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const Root = styled('div')(({ theme }) => ({

type MarkdownElementProps = {
renderedMarkdown: string;
} & Omit<JSX.IntrinsicElements['div'], 'ref'>;
} & Omit<React.JSX.IntrinsicElements['div'], 'ref'>;

const MarkdownElement = React.forwardRef<HTMLDivElement, MarkdownElementProps>(
function MarkdownElement(props, ref) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface ClickAwayListenerProps {
/**
* The wrapped element.
*/
children: React.ReactElement;
children: React.ReactElement<any>;
/**
* If `true`, the React tree is ignored and only the DOM tree is considered.
* This prop changes how portaled elements are handled.
Expand Down Expand Up @@ -72,7 +72,7 @@ export interface ClickAwayListenerProps {
*
* - [ClickAwayListener API](https://mui.com/material-ui/api/click-away-listener/)
*/
function ClickAwayListener(props: ClickAwayListenerProps): JSX.Element {
function ClickAwayListener(props: ClickAwayListenerProps): React.JSX.Element {
const {
children,
disableReactTree = false,
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/NoSsr/NoSsr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { NoSsrProps } from './NoSsr.types';
*
* - [NoSsr API](https://mui.com/material-ui/api/no-ssr/)
*/
function NoSsr(props: NoSsrProps): JSX.Element {
function NoSsr(props: NoSsrProps): React.JSX.Element {
const { children, defer = false, fallback = null } = props;
const [mountedState, setMountedState] = React.useState(false);

Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Unstable_TrapFocus/FocusTrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function defaultIsEnabled(): boolean {
/**
* @ignore - internal component.
*/
function FocusTrap(props: FocusTrapProps): JSX.Element {
function FocusTrap(props: FocusTrapProps): React.JSX.Element {
const {
children,
disableAutoFocus = false,
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/utils/PolymorphicComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { DistributiveOmit, OverridableTypeMap } from '@mui/types';
export type PolymorphicComponent<TypeMap extends OverridableTypeMap> = {
<RootComponent extends React.ElementType = TypeMap['defaultComponent']>(
props: PolymorphicProps<TypeMap, RootComponent>,
): JSX.Element | null;
): React.JSX.Element | null;
propTypes?: any;
displayName?: string | undefined;
};
Expand Down

0 comments on commit f4f1013

Please sign in to comment.