Skip to content
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

chore(dialog): add generic param for config data #7447

Merged
merged 1 commit into from
Oct 12, 2017

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Sep 30, 2017

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.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 30, 2017
@@ -23,7 +23,7 @@ export interface DialogPosition {
/**
* Configuration for opening a modal dialog with the MatDialog service.
*/
export class MatDialogConfig {
export class MatDialogConfig<D = any> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this require TS 2.3 or 2.4?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're at ~2.4.2.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Oct 11, 2017
@jelbourn
Copy link
Member

jelbourn commented Oct 11, 2017

We may use 2.4, but I don't think we ever officially said that we require greater than 2.2. Can you add a BREAKING CHANGE message for that?

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.
@crisbeto
Copy link
Member Author

Updated.

@rafaelss95
Copy link
Contributor

rafaelss95 commented Oct 11, 2017

According to this comment, the core team recommends the use of typescript@'>=2.1.0 <2.4.0' for Angular 4x. Also, you get a warning in a CLI project if you try to use typescript greater than 2.4.

More precisely:

@angular/compiler-cli@4.4.4 requires typescript@'>=2.1.0 <2.4.0' but 2.4.2 was found instead.
Using this version can result in undefined behaviour and difficult to debug problems.

Please run the following command to install a compatible version of TypeScript.

    npm install typescript@'>=2.1.0 <2.4.0'

@andrewseguin andrewseguin merged commit b29ac45 into angular:master Oct 12, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: Make MdDialogConfig generic and use type for data property
5 participants