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

[typescript] Rescue missing backports v5 #44712

Merged
merged 1 commit into from
Dec 10, 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
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
Loading