-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Make MdDialogConfig
generic and use type for data
property
#4398
Comments
This definitely makes sense, however it'll be a breaking change. I think that we should wait until we start supporting TypeScript > 2.3, which introduces default values for generic parameters. |
Adds a generic parameter to the `MatDialogConfig` that indicates the type of its `data`. Fixes angular#4398.
Adds a generic parameter to the `MatDialogConfig` that indicates the type of its `data`. Fixes angular#4398.
Adds a generic parameter to the `MatDialogConfig` that indicates the type of its `data`. BREAKING CHANGE: Material now requires at least TypeScript 2.4. Fixes angular#4398.
Adds a generic parameter to the `MatDialogConfig` that indicates the type of its `data`. BREAKING CHANGE: Material now requires at least TypeScript 2.4. Fixes #4398.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
I propose making
MdDialogConfig
a generic and use the type for thedata
property to add better type safety.See https://github.com/angular/material2/blob/master/src/lib/dialog/dialog-config.ts#L49
Instead of using any you could do
This would give better type safety on the data property.
What is the current behavior?
Data is type
any
Which versions of Angular, Material, OS, browsers are affected?
2.0.0-beta.3 cesium-cephalopod (2017-04-07)
The text was updated successfully, but these errors were encountered: