Это часть интерфейса Material-UI:
export interface DialogProps
extends StandardProps<ModalProps & Partial<TransitionHandlerProps>, DialogClassKey, 'children'> {
/**
* The id(s) of the element(s) that describe the dialog.
*/
/**
* If `true`, the dialog stretches to `maxWidth`.
*
* Notice that the dialog width grow is limited by the default margin.
*/
fullWidth?: boolean;
/**
* Determine the max-width of the dialog.
* The dialog width grows with the size of the screen.
* Set to `false` to disable `maxWidth`.
*/
maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | false;
/**
* Callback fired when the backdrop is clicked.
*/
/**
* Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.
*/
TransitionProps?: TransitionProps;
}
Я попробовал следующее задание (оно работает!):
const maxWidth: DialogProps['maxWidth'] = 'lg'
Мой вопрос: что это значит? Могу ли я считать это объявлением новой переменной, которая является «подтипом» DialogProps? Где я могу найти документацию об этой топике c в машинописном тексте?
Спасибо