Conform more of the codebase to strict types (#11162)
This commit is contained in:
parent
9c7d935aae
commit
95283d21bb
9 changed files with 36 additions and 31 deletions
|
@ -29,9 +29,11 @@ const DIALOG_CONTAINER_ID = "mx_Dialog_Container";
|
|||
const STATIC_DIALOG_CONTAINER_ID = "mx_Dialog_StaticContainer";
|
||||
|
||||
// Type which accepts a React Component which looks like a Modal (accepts an onFinished prop)
|
||||
export type ComponentType = React.ComponentType<{
|
||||
onFinished(...args: any): void;
|
||||
}>;
|
||||
export type ComponentType =
|
||||
| React.ComponentType<{
|
||||
onFinished(...args: any): void;
|
||||
}>
|
||||
| React.ComponentType<any>;
|
||||
|
||||
// Generic type which returns the props of the Modal component with the onFinished being optional.
|
||||
export type ComponentProps<C extends ComponentType> = Defaultize<
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue