This is part of a Material-UI interface:
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;
}
I tried the following assignment (it works!):
const maxWidth: DialogProps['maxWidth'] = 'lg'
My question is: what does it means? Could I consider it as declaring a new variable that is a 'sub-type' of DialogProps? Where could I find some documentation about this topic in typescript?
Thank you