fix(dialog): improved type safety in dialog ref result (#8766)
fix(dialog): improved type safety in dialog ref result (#8766)

Adds an extra generic param to the `MatDialogRef` that allows consumers to type the result that is passed to `close`, as well as the value in the `beforeClosed` and `afterClosed` observables.

Fixes #8760.
tinayuangao/material2,jelbourn/material2,jelbourn/material2,Eddman/material2,Eddman/material2,josephperrott/material2,andrewseguin/material2,crisbeto/material2,emoralesb05/material2,willshowell/material2,amcdnl/material2,Jefiozie/material2,fairfaxmedia/material2,angular/components,willshowell/material2,emoralesb05/material2,josephperrott/material2,Jefiozie/material2,crisbeto/material2,andrewseguin/material2,amcdnl/material2,fairfaxmedia/material2,fairfaxmedia/material2,willshowell/material2,tinayuangao/material2,amcdnl/material2,DevVersion/material2,ppham27/material2,Jefiozie/material2,andrewseguin/material2,Eddman/material2,angular/components,fairfaxmedia/material2,ppham27/material2,andrewseguin/material2,andrewseguin/material2,emoralesb05/material2,ppham27/material2,crisbeto/material2,angular/components,willshowell/material2,crisbeto/material2,mmalerba/material2,DevVersion/material2,Jefiozie/material2,ppham27/material2,tinayuangao/material2,amcdnl/material2,willshowell/material2,Eddman/material2,josephperrott/material2,DevVersion/material2,amcdnl/material2,emoralesb05/material2,josephperrott/material2,jelbourn/material2,Eddman/material2,jelbourn/material2,DevVersion/material2,emoralesb05/material2,mmalerba/material2,mmalerba/material2,ppham27/material2,tinayuangao/material2,mmalerba/material2,DevVersion/material2,mmalerba/material2,jelbourn/material2,josephperrott/material2,tinayuangao/material2,angular/components,Jefiozie/material2,fairfaxmedia/material2