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

feat: add support for typescript 3.2 #27536

Closed
wants to merge 6 commits into from

Conversation

IgorMinar
Copy link
Contributor

https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-2.html
https://blogs.msdn.microsoft.com/typescript/2018/11/29/announcing-typescript-3-2/

Any application using tsickle for closure compatibility will need to update it's tsickle dependency to 0.34

@IgorMinar IgorMinar added state: WIP target: major This PR is targeted for the next major release labels Dec 7, 2018
@mary-poppins
Copy link

You can preview 0f86dfc at https://pr27536-0f86dfc.ngbuilds.io/.

@mary-poppins
Copy link

You can preview 3ff3b65 at https://pr27536-3ff3b65.ngbuilds.io/.

@mary-poppins
Copy link

You can preview 42d7176 at https://pr27536-42d7176.ngbuilds.io/.

@mary-poppins
Copy link

You can preview 8d4ba41 at https://pr27536-8d4ba41.ngbuilds.io/.

@mary-poppins
Copy link

You can preview d784ba0 at https://pr27536-d784ba0.ngbuilds.io/.

@mary-poppins
Copy link

You can preview ff0edd5 at https://pr27536-ff0edd5.ngbuilds.io/.

@mary-poppins
Copy link

You can preview f5a6d4c at https://pr27536-f5a6d4c.ngbuilds.io/.

@mary-poppins
Copy link

You can preview 1530a94 at https://pr27536-1530a94.ngbuilds.io/.

@mary-poppins
Copy link

You can preview d8202f3 at https://pr27536-d8202f3.ngbuilds.io/.

@IgorMinar IgorMinar added action: review The PR is still awaiting reviews from at least one requested reviewer and removed state: WIP labels Dec 15, 2018
@@ -8,6 +8,8 @@
import {dirname} from 'canonical-path';
import {existsSync, writeFileSync} from 'fs';
import {mkdir, mv} from 'shelljs';
// "unused" import needed by tsc type inference
import * as ts from 'typescript';
Copy link
Member

Choose a reason for hiding this comment

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

I think this is required by the return type of Transformer.analyzeProgram being inferred (and the inferred type including TS types). If you make that return type explicit, this statement won't appear unused.

@mary-poppins
Copy link

You can preview a6e6763 at https://pr27536-a6e6763.ngbuilds.io/.

@IgorMinar
Copy link
Contributor Author

@mary-poppins
Copy link

You can preview 00e0894 at https://pr27536-00e0894.ngbuilds.io/.

import { createCustomElement } from '@angular/elements';

// huh? not sure why, but ts 3.2 emits broken code for: `import { from as fromPromise, ...} from 'rxjs';
// this const alias works around the problem.
const fromPromise = from;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not update the references to not use the alias?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's what I'll do for now, I just wanted to get more people to take a look at this because import as should work and shouldn't break with a typescript update.

I filed angular/angular-cli#13212 to track this.

@IgorMinar IgorMinar added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Dec 18, 2018
@IgorMinar
Copy link
Contributor Author

caretaker note: pullapprove and travis flaked

@mhevery mhevery closed this in 17e702b Dec 18, 2018
mhevery pushed a commit that referenced this pull request Dec 18, 2018
…al (#27536)

Typescript 3.2 introduced BigInt type, and consequently the
implementation for checkExpressionWorker() in checkers.ts is refactored.

For NumberLiteral and StringLiteral types, 'text' filed must be present
in the Node type, therefore they must be LiteralLikeNode instead of
Node.

PR Close #27536
mhevery pushed a commit that referenced this pull request Dec 18, 2018
It's unclear why `import as` results in the aliases to be undefined.

Plain tsc seems to do the right thing and emits the correct code, so it
might be some kind of interaction in @angular/cli or webpack that are
causing the failure.

This should be investigated separately from the tsc update in
angular/angular. See angular/angular-cli#13212

PR Close #27536
mhevery pushed a commit that referenced this pull request Dec 18, 2018
…27536)

cli is not yet officially compatible with typescript 3.2, so we need to disable the version check via:

ng config cli.warnings.typescriptMismatch false

PR Close #27536
mhevery pushed a commit that referenced this pull request Dec 18, 2018
…mpilerOptions (#27536)

We need to do this because we don't yet have a released version of angular
with typescript 3.2 support and on CI we test both against the snapshot and
whatever is in aio/yarn.lock.

Once we have the next rc or a stable relase we should be able to remove
this flag.

PS: I also removed the preserveWhitespace:false because that's the default now.

PR Close #27536
IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018
IgorMinar pushed a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018
…al (angular#27536)

Typescript 3.2 introduced BigInt type, and consequently the
implementation for checkExpressionWorker() in checkers.ts is refactored.

For NumberLiteral and StringLiteral types, 'text' filed must be present
in the Node type, therefore they must be LiteralLikeNode instead of
Node.

PR Close angular#27536
IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018
It's unclear why `import as` results in the aliases to be undefined.

Plain tsc seems to do the right thing and emits the correct code, so it
might be some kind of interaction in @angular/cli or webpack that are
causing the failure.

This should be investigated separately from the tsc update in
angular/angular. See angular/angular-cli#13212

PR Close angular#27536
IgorMinar pushed a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018
IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018
…ngular#27536)

cli is not yet officially compatible with typescript 3.2, so we need to disable the version check via:

ng config cli.warnings.typescriptMismatch false

PR Close angular#27536
IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018
…mpilerOptions (angular#27536)

We need to do this because we don't yet have a released version of angular
with typescript 3.2 support and on CI we test both against the snapshot and
whatever is in aio/yarn.lock.

Once we have the next rc or a stable relase we should be able to remove
this flag.

PS: I also removed the preserveWhitespace:false because that's the default now.

PR Close angular#27536
IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018
IgorMinar pushed a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018
…al (angular#27536)

Typescript 3.2 introduced BigInt type, and consequently the
implementation for checkExpressionWorker() in checkers.ts is refactored.

For NumberLiteral and StringLiteral types, 'text' filed must be present
in the Node type, therefore they must be LiteralLikeNode instead of
Node.

PR Close angular#27536
IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018
It's unclear why `import as` results in the aliases to be undefined.

Plain tsc seems to do the right thing and emits the correct code, so it
might be some kind of interaction in @angular/cli or webpack that are
causing the failure.

This should be investigated separately from the tsc update in
angular/angular. See angular/angular-cli#13212

PR Close angular#27536
IgorMinar pushed a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018
IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018
…ngular#27536)

cli is not yet officially compatible with typescript 3.2, so we need to disable the version check via:

ng config cli.warnings.typescriptMismatch false

PR Close angular#27536
IgorMinar added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018
…mpilerOptions (angular#27536)

We need to do this because we don't yet have a released version of angular
with typescript 3.2 support and on CI we test both against the snapshot and
whatever is in aio/yarn.lock.

Once we have the next rc or a stable relase we should be able to remove
this flag.

PS: I also removed the preserveWhitespace:false because that's the default now.

PR Close angular#27536
@zw-slime
Copy link

zw-slime commented Jan 9, 2019

Package "ng-zorro-antd" has an incompatible peer dependency to "typescript" (requires "~3.1.1", would install "3.2.2").

I can not update ngrx to 7.0.0, please help, when can support typescript 3.2?

@IgorMinar
Copy link
Contributor Author

IgorMinar commented Jan 9, 2019 via email

ngfelixl pushed a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019
ngfelixl pushed a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019
…al (angular#27536)

Typescript 3.2 introduced BigInt type, and consequently the
implementation for checkExpressionWorker() in checkers.ts is refactored.

For NumberLiteral and StringLiteral types, 'text' filed must be present
in the Node type, therefore they must be LiteralLikeNode instead of
Node.

PR Close angular#27536
ngfelixl pushed a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019
It's unclear why `import as` results in the aliases to be undefined.

Plain tsc seems to do the right thing and emits the correct code, so it
might be some kind of interaction in @angular/cli or webpack that are
causing the failure.

This should be investigated separately from the tsc update in
angular/angular. See angular/angular-cli#13212

PR Close angular#27536
ngfelixl pushed a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019
ngfelixl pushed a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019
…ngular#27536)

cli is not yet officially compatible with typescript 3.2, so we need to disable the version check via:

ng config cli.warnings.typescriptMismatch false

PR Close angular#27536
ngfelixl pushed a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019
…mpilerOptions (angular#27536)

We need to do this because we don't yet have a released version of angular
with typescript 3.2 support and on CI we test both against the snapshot and
whatever is in aio/yarn.lock.

Once we have the next rc or a stable relase we should be able to remove
this flag.

PS: I also removed the preserveWhitespace:false because that's the default now.

PR Close angular#27536
@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 14, 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 merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants