Skip to content

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.

@crisbeto crisbeto requested a review from jelbourn as a code owner September 30, 2017 17:21
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 30, 2017
* 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 crisbeto force-pushed the 4398/dialog-generic branch from a1c6b56 to 544ac12 Compare October 11, 2017 21:23
@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/[email protected] 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