Skip to content

Commit

Permalink
Adjust types
Browse files Browse the repository at this point in the history
  • Loading branch information
Janpot committed Oct 11, 2024
1 parent 3d55f7d commit 545901e
Show file tree
Hide file tree
Showing 28 changed files with 28 additions and 31 deletions.
2 changes: 1 addition & 1 deletion packages/mui-lab/src/CalendarPicker/CalendarPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type CalendarPickerComponent = (<TDate>(
props: CalendarPickerProps<TDate> & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The CalendarPicker component was moved from `@mui/lab` to `@mui/x-date-pickers`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ const warn = () => {
}
};

type CalendarPickerSkeletonComponent = ((
props: CalendarPickerSkeletonProps & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };

/**
* @deprecated The CalendarPickerSkeleton component was moved from `@mui/lab` to `@mui/x-date-pickers`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
* @ignore - do not document.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-lab/src/ClockPicker/ClockPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type ClockPickerComponent = (<TDate>(
props: ClockPickerProps<TDate> & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The ClockPicker component was moved from `@mui/lab` to `@mui/x-date-pickers`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-lab/src/DatePicker/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type DatePickerComponent = (<TDate>(
props: DatePickerProps<TDate> & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @ignore - do not document.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-lab/src/DateRangePicker/DateRangePicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type DateRangePickerComponent = (<TDate>(
props: DateRangePickerProps & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The DateRangePicker component was moved from `@mui/lab` to `@mui/x-date-pickers-pro`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const warn = () => {

type DateRangePickerDayComponent = (<TDate>(
props: DateRangePickerDayProps & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The DateRangePickerDay component was moved from `@mui/lab` to `@mui/x-date-pickers-pro`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-lab/src/DateTimePicker/DateTimePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type DateTimePickerComponent = (<TDate>(
props: DateTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The DateTimePicker component was moved from `@mui/lab` to `@mui/x-date-pickers`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type DesktopDatePickerComponent = (<TDate>(
props: DesktopDatePickerProps<TDate> & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The DesktopDatePicker component was moved from `@mui/lab` to `@mui/x-date-pickers`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type DesktopDateRangePickerComponent = (<TDate>(
props: DesktopDateRangePickerProps & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The DesktopDateRangePicker component was moved from `@mui/lab` to `@mui/x-date-pickers-pro`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type DesktopDateTimePickerComponent = (<TDate>(
props: DesktopDateTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The DesktopDateTimePicker component was moved from `@mui/lab` to `@mui/x-date-pickers`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type DesktopTimePickerComponent = (<TDate>(
props: DesktopTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The DesktopTimePicker component was moved from `@mui/lab` to `@mui/x-date-pickers-pro`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const warn = () => {

type LocalizationProviderComponent = ((
props: LocalizationProviderProps & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The LocalizationProvider component was moved from `@mui/lab` to `@mui/x-date-pickers`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-lab/src/MobileDatePicker/MobileDatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type MobileDatePickerComponent = (<TDate>(
props: MobileDatePickerProps<TDate> & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The MobileDatePicker component was moved from `@mui/lab` to `@mui/x-date-pickers`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type MobileDateRangePickerComponent = (<TDate>(
props: MobileDateRangePickerProps & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The MobileDateRangePicker component was moved from `@mui/lab` to `@mui/x-date-pickers-pro`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type MobileDateTimePickerComponent = (<TDate>(
props: MobileDateTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The MobileDateTimePicker component was moved from `@mui/lab` to `@mui/x-date-pickers`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-lab/src/MobileTimePicker/MobileTimePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type MobileTimePickerComponent = (<TDate>(
props: MobileTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The MobileTimePicker component was moved from `@mui/lab` to `@mui/x-date-pickers`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-lab/src/MonthPicker/MonthPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type MonthPickerComponent = (<TDate>(
props: MonthPickerProps<TDate> & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The MonthPicker component was moved from `@mui/lab` to `@mui/x-date-pickers`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-lab/src/PickersDay/PickersDay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type PickersDayComponent = (<TDate>(
props: PickersDayProps<TDate> & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The PickersDay component was moved from `@mui/lab` to `@mui/x-date-pickers`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-lab/src/StaticDatePicker/StaticDatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type StaticDatePickerComponent = (<TDate>(
props: StaticDatePickerProps<TDate> & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The StaticDatePicker component was moved from `@mui/lab` to `@mui/x-date-pickers`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type StaticDateRangePickerComponent = (<TDate>(
props: StaticDateRangePickerProps & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The StaticDateRangePicker component was moved from `@mui/lab` to `@mui/x-date-pickers-pro`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type StaticDateTimePickerComponent = (<TDate>(
props: StaticDateTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The StaticDateTimePicker component was moved from `@mui/lab` to `@mui/x-date-pickers`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-lab/src/StaticTimePicker/StaticTimePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type StaticTimePickerComponent = (<TDate>(
props: StaticTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The StaticTimePicker component was moved from `@mui/lab` to `@mui/x-date-pickers`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-lab/src/TimePicker/TimePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type TimePickerComponent = (<TDate>(
props: TimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The StaticTimePicker component was moved from `@mui/lab` to `@mui/x-date-pickers`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-lab/src/TreeItem/TreeItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const warn = () => {

type TreeItemComponent = ((
props: TreeItemProps & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The TreeItem component was moved from `@mui/lab` to `@mui/x-tree-view`. More information about this migration on our blog: https://mui.com/blog/lab-tree-view-to-mui-x/.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-lab/src/TreeView/TreeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type TreeViewComponent<Multiple extends boolean | undefined = undefined> = ((
props: TreeViewProps<Multiple> & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The TreeView component was moved from `@mui/lab` to `@mui/x-tree-view`. More information about this migration on our blog: https://mui.com/blog/lab-tree-view-to-mui-x/.
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-lab/src/YearPicker/YearPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const warn = () => {

type YearPickerComponent = (<TDate>(
props: YearPickerProps<TDate> & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };
) => React.JSX.Element) & { propTypes?: any; displayName?: string };

/**
* @deprecated The YearPicker component was moved from `@mui/lab` to `@mui/x-date-pickers`. More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-system/src/cssVars/createCssVarsProvider.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import InitColorSchemeScript from '../InitColorSchemeScript';
import { InitColorSchemeScriptProps } from '../InitColorSchemeScript';
import { Result } from './useCurrentColorScheme';

export interface ColorSchemeContextValue<SupportedColorScheme extends string>
Expand Down Expand Up @@ -90,7 +90,7 @@ export interface CreateCssVarsProviderResult<
>,
) => React.JSX.Element;
useColorScheme: () => ColorSchemeContextValue<ColorScheme>;
getInitColorSchemeScript: typeof InitColorSchemeScript;
getInitColorSchemeScript: (props: InitColorSchemeScriptProps) => React.JSX.Element;
}

export default function createCssVarsProvider<
Expand Down
1 change: 1 addition & 0 deletions packages/mui-types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export interface OverridableComponent<M extends OverridableTypeMap> {
): React.JSX.Element | null;
(props: DefaultComponentProps<M>): React.JSX.Element | null;
propTypes?: any;
displayName?: string;
}

/**
Expand Down

0 comments on commit 545901e

Please sign in to comment.