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 {
23
23
/**
24
24
* Configuration for opening a modal dialog with the MatDialog service.
25
25
*/
26
- export class MatDialogConfig {
26
+ export class MatDialogConfig < D = any > {
27
27
28
28
/**
29
29
* Where the attached component should live in Angular's *logical* component tree.
@@ -61,7 +61,7 @@ export class MatDialogConfig {
61
61
position ?: DialogPosition ;
62
62
63
63
/** Data being injected into the child component. */
64
- data ?: any = null ;
64
+ data ?: D | null = null ;
65
65
66
66
/** Layout direction for the dialog's content. */
67
67
direction ?: Direction = 'ltr' ;
Original file line number Diff line number Diff line change @@ -114,8 +114,8 @@ export class MatDialog {
114
114
* @param config Extra configuration options.
115
115
* @returns Reference to the newly-opened dialog.
116
116
*/
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 > {
119
119
120
120
const inProgressDialog = this . openDialogs . find ( dialog => dialog . _isAnimating ( ) ) ;
121
121
You can’t perform that action at this time.
0 commit comments