File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export interface DialogPosition {
2323/**
2424 * Configuration for opening a modal dialog with the MatDialog service.
2525 */
26- export class MatDialogConfig {
26+ export class MatDialogConfig < D = any > {
2727
2828 /**
2929 * Where the attached component should live in Angular's *logical* component tree.
@@ -61,7 +61,7 @@ export class MatDialogConfig {
6161 position ?: DialogPosition ;
6262
6363 /** Data being injected into the child component. */
64- data ?: any = null ;
64+ data ?: D | null = null ;
6565
6666 /** Layout direction for the dialog's content. */
6767 direction ?: Direction = 'ltr' ;
Original file line number Diff line number Diff line change @@ -114,8 +114,8 @@ export class MatDialog {
114114 * @param config Extra configuration options.
115115 * @returns Reference to the newly-opened dialog.
116116 */
117- open < T > ( componentOrTemplateRef : ComponentType < T > | TemplateRef < T > ,
118- config ?: MatDialogConfig ) : MatDialogRef < T > {
117+ open < T , D = any > ( componentOrTemplateRef : ComponentType < T > | TemplateRef < T > ,
118+ config ?: MatDialogConfig < D > ) : MatDialogRef < T > {
119119
120120 const inProgressDialog = this . openDialogs . find ( dialog => dialog . _isAnimating ( ) ) ;
121121
You can’t perform that action at this time.
0 commit comments