@@ -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 , D = any > ( componentOrTemplateRef : ComponentType < T > | TemplateRef < T > ,
118
- config ?: MatDialogConfig < D > ) : MatDialogRef < T > {
117
+ open < T , D = any , R = any > ( componentOrTemplateRef : ComponentType < T > | TemplateRef < T > ,
118
+ config ?: MatDialogConfig < D > ) : MatDialogRef < T , R > {
119
119
120
120
config = _applyConfigDefaults ( config , this . _defaultOptions || new MatDialogConfig ( ) ) ;
121
121
@@ -125,8 +125,10 @@ export class MatDialog {
125
125
126
126
const overlayRef = this . _createOverlay ( config ) ;
127
127
const dialogContainer = this . _attachDialogContainer ( overlayRef , config ) ;
128
- const dialogRef =
129
- this . _attachDialogContent < T > ( componentOrTemplateRef , dialogContainer , overlayRef , config ) ;
128
+ const dialogRef = this . _attachDialogContent < T , R > ( componentOrTemplateRef ,
129
+ dialogContainer ,
130
+ overlayRef ,
131
+ config ) ;
130
132
131
133
// If this is the first dialog that we're opening, hide all the non-overlay content.
132
134
if ( ! this . openDialogs . length ) {
@@ -221,15 +223,16 @@ export class MatDialog {
221
223
* @param config The dialog configuration.
222
224
* @returns A promise resolving to the MatDialogRef that should be returned to the user.
223
225
*/
224
- private _attachDialogContent < T > (
226
+ private _attachDialogContent < T , R > (
225
227
componentOrTemplateRef : ComponentType < T > | TemplateRef < T > ,
226
228
dialogContainer : MatDialogContainer ,
227
229
overlayRef : OverlayRef ,
228
- config : MatDialogConfig ) : MatDialogRef < T > {
230
+ config : MatDialogConfig ) : MatDialogRef < T , R > {
229
231
230
232
// Create a reference to the dialog we're creating in order to give the user a handle
231
233
// to modify and close it.
232
- const dialogRef = new MatDialogRef < T > ( overlayRef , dialogContainer , this . _location , config . id ) ;
234
+ const dialogRef =
235
+ new MatDialogRef < T , R > ( overlayRef , dialogContainer , this . _location , config . id ) ;
233
236
234
237
// When the dialog backdrop is clicked, we want to close it.
235
238
if ( config . hasBackdrop ) {
0 commit comments