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

refactor(compiler): remove support for TypeScript 3.9 #39313

Closed

Conversation

AndrewKushnir
Copy link
Contributor

@AndrewKushnir AndrewKushnir commented Oct 17, 2020

This commit removes TypeScript 3.9 support.

NOTE: corresponding TS 3.9 integration tests will be removed later in a followup cleanup PR.

BREAKING CHANGE:

TypeScript 3.9 is no longer supported, please upgrade to TypeScript 4.0.

Does this PR introduce a breaking change?

  • Yes
  • No

@AndrewKushnir
Copy link
Contributor Author

@AndrewKushnir AndrewKushnir commented Oct 17, 2020

@AndrewKushnir AndrewKushnir marked this pull request as ready for review Oct 17, 2020
@AndrewKushnir AndrewKushnir requested a review from alan-agius4 Oct 17, 2020
@pullapprove pullapprove bot requested a review from kyliau Oct 17, 2020
@AndrewKushnir AndrewKushnir requested review from jelbourn and removed request for kyliau Oct 17, 2020
@pullapprove pullapprove bot requested a review from kyliau Oct 17, 2020
Copy link
Contributor

@alan-agius4 alan-agius4 left a comment

Thanks @AndrewKushnir, LGTM

crisbeto added a commit to crisbeto/material2 that referenced this issue Oct 19, 2020
Removes the TypeScript 3.9 checks since the framework is in the process of
removing support (see angular/angular#39313).

Also updates the Firebase functions to TS 4.0.
This commit removes TypeScript 3.9 support.

BREAKING CHANGE:

TypeScript 3.9 is no longer supported, please upgrade to TypeScript 4.0.
Copy link
Member

@jelbourn jelbourn left a comment

LGTM

Reviewed-for: global-docs-approvers

kyliau
kyliau approved these changes Oct 19, 2020
AndrewKushnir added a commit that referenced this issue Oct 19, 2020
This commit removes TypeScript 3.9 support.

BREAKING CHANGE:

TypeScript 3.9 is no longer supported, please upgrade to TypeScript 4.0.

PR Close #39313
crisbeto added a commit to crisbeto/material2 that referenced this issue Oct 25, 2020
Removes the TypeScript 3.9 checks since the framework is in the process of
removing support (see angular/angular#39313).

Also updates the Firebase functions to TS 4.0.
@KapilSachdev
Copy link

@KapilSachdev KapilSachdev commented Oct 26, 2020

I had encountered an issue with TS 4 and 10.1 which was reported here, which is still happening with 11.0.0-rc.0 and TS 4.

ERROR in src/app/some/some.component.ts:26:81 - error TS2729: Property 'some_id' is used before its initialization.

26   public data: any = {some_id: this?.some_id, date: new Date()};
                                                                                   ~~~~~~~~~~~~~~~

  src/app/some/some.component.ts:22:12
    22   @Input() some_id
                  ~~~~~~~~~~~~~~~
    'some_id' is declared here.

As it is evident, the variable is defined before its being used.
Also it works fine with 3.9.
I'm not sure if TS 4.0 introduced something that could cause this issue, but i think its ng so just wanted to confirm. I tried to look into issue tracker for similar reports, though not that deeply, but didn't found any.

@AndrewKushnir
Copy link
Contributor Author

@AndrewKushnir AndrewKushnir commented Oct 26, 2020

@KapilSachdev, could you please create a new ticket and provide the necessary information (by following the template), so that the team can have a look? As a part of the new ticket, please also provide an example of the code that doesn't work, so that we can reproduce the problem. Thank you.

@KapilSachdev
Copy link

@KapilSachdev KapilSachdev commented Oct 27, 2020

Before creating a new issue i wanted to confirm one more thing, in case the behaviour is expected.
When the properties are being called on component initialization the issue occurs with TS 4 but not with TS 3.9.

@Input() some_id
public data: any = {some_id: this?.some_id, date: new Date()};

ngOnInit() {
}

Moving the data property initialization that uses @Input() property inside ngOnInit fixes the problem in TS 4

@Input() some_id

ngOnInit() {
  public data: any = {some_id: this?.some_id, date: new Date()};
}

Is this expected behaviour because @Input is not yet passed to the component? In case yes, why it does nto happens with TS 3.9

@AndrewKushnir
Copy link
Contributor Author

@AndrewKushnir AndrewKushnir commented Oct 27, 2020

@KapilSachdev I don't think your use-case is specific to Angular (the error is being produced by the TypeScript). You can see how different version of TypeScript handle this in TypeScript Playground.

josephperrott added a commit to crisbeto/material2 that referenced this issue Nov 12, 2020
Removes the TypeScript 3.9 checks since the framework is in the process of
removing support (see angular/angular#39313).

Also updates the Firebase functions to TS 4.0.
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 13, 2020
Removes the TypeScript 3.9 checks since the framework is in the process of
removing support (see angular/angular#39313).

Also updates the Firebase functions to TS 4.0.
mmalerba pushed a commit to angular/components that referenced this issue Nov 13, 2020
Removes the TypeScript 3.9 checks since the framework is in the process of
removing support (see angular/angular#39313).

Also updates the Firebase functions to TS 4.0.
mmalerba added a commit to angular/components that referenced this issue Nov 13, 2020
Removes the TypeScript 3.9 checks since the framework is in the process of
removing support (see angular/angular#39313).

Also updates the Firebase functions to TS 4.0.

(cherry picked from commit ab8ec83)
trik added a commit to gnucoop/ajf that referenced this issue Nov 19, 2020
Removes the TypeScript 3.9 checks since the framework is in the process of
removing support (see angular/angular#39313).

Also updates the Firebase functions to TS 4.0.
@angular-automatic-lock-bot
Copy link

@angular-automatic-lock-bot angular-automatic-lock-bot bot commented Nov 27, 2020

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 Nov 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants