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

[HOLD] Update Typescript (3.5 -> 3.7) when Angular supports it #5363

Closed
Pucek9 opened this issue Nov 12, 2019 · 6 comments
Closed

[HOLD] Update Typescript (3.5 -> 3.7) when Angular supports it #5363

Pucek9 opened this issue Nov 12, 2019 · 6 comments
Milestone

Comments

@Pucek9
Copy link
Contributor

Pucek9 commented Nov 12, 2019

Typescript version 3.7 has been released.
It adds 2 useful features:

  • Optional chaining operator
  • Nullish Coalescing

More: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html

Let's update that package and obsolete code in the project.

@tobi-or-not-tobi
Copy link
Contributor

we're depending on a couple of things here:

  • angular doesn't yet support it (unless you set the disableTypeScriptVersionCheck in tsconfig)
  • ts/es linters aren't ready yet, so you have a bad experience in IDE
  • prettier stable 3.0 is required as well

But, totally agree, as soon as those dependencies are in place, we should use it!

@Pucek9
Copy link
Contributor Author

Pucek9 commented Nov 13, 2019

@tobi-or-not-tobi

Not really, I tested it in this stack and it's working as well! :)
"typescript": "^3.7.2", ✔
"prettier": "^1.19.1", ✔
"tslint": "^5.20.1", ✔

Webstorm 2019.2 (stable) ✔
VSCode 1.41.0-insider ✔

So one probable blocker is Angular and stable VSCode
"angular": "~8.2.5", ❔ (not verified yet)
VSCode 1.40.0 (stable) ❌

@Xymmer Xymmer changed the title Update Typescript (3.5 -> 3.7) Update Typescript (3.5 -> 3.7) (after 1.3.0 is released) Nov 17, 2019
@Xymmer Xymmer added this to the 1.3.1 milestone Nov 17, 2019
@Xymmer
Copy link
Contributor

Xymmer commented Nov 17, 2019

if we're agreeing to update, let's do it after 1.3.0 is out to be safe.
also is this something that ca be done in a patch fix, it has no effect compatibility-wise?

@Pucek9
Copy link
Contributor Author

Pucek9 commented Nov 25, 2019

Update
In VSCode 1.40.1 (stable) ✔ it enough to select typescript version from the workspace
"angular": "~8.2.5" or "~8.2.14" ❌
ERROR: The Angular Compiler requires TypeScript >=3.4.0 and <3.6.0 but 3.7.2 was found instead.

After disable TypeScriptVersionCheck ❌ build:core:lib fails because of occ.models

ERROR: projects/core/src/occ/occ-models/occ.models.ts(228,17): error TS4033: Property 'priceType' of exported interface has or is using private name 'PriceType'.
projects/core/src/occ/occ-models/occ.models.ts(271,17): error TS4033: Property 'imageType' of exported interface has or is using private name 'ImageType'.
projects/core/src/occ/occ-models/occ.models.ts(3944,20): error TS4033: Property 'consentState' of exported interface has or is using private name 'CONSENT_STATUS'.

An unhandled exception occurred: projects/core/src/occ/occ-models/occ.models.ts(228,17): error TS4033: Property 'priceType' of exported interface has or is using private name 'PriceType

'.
projects/core/src/occ/occ-models/occ.models.ts(271,17): error TS4033: Property 'imageType' of exported interface has or is using private name 'ImageType'.
projects/core/src/occ/occ-models/occ.models.ts(3944,20): error TS4033: Property 'consentState' of exported interface has or is using private name 'CONSENT_STATUS'.

@Xymmer Xymmer modified the milestones: 1.3.1, FUTURE Nov 26, 2019
@Xymmer Xymmer changed the title Update Typescript (3.5 -> 3.7) (after 1.3.0 is released) Update Typescript (3.5 -> 3.7) Nov 26, 2019
@Xymmer Xymmer changed the title Update Typescript (3.5 -> 3.7) Update Typescript (3.5 -> 3.7) when Angular supports it Nov 26, 2019
@Xymmer Xymmer changed the title Update Typescript (3.5 -> 3.7) when Angular supports it [HOLD] Update Typescript (3.5 -> 3.7) when Angular supports it Nov 26, 2019
@trusktr
Copy link

trusktr commented Dec 21, 2019

Regarding the all-too-common "has or is using private name" error, I've opened a request to fix issues like these in TypeScript by bringing declaration files to parity with language features. microsoft/TypeScript#35822

@Xymmer Xymmer modified the milestones: FUTURE, 2.x Feb 7, 2020
@Xymmer
Copy link
Contributor

Xymmer commented Jun 27, 2020

we're up to 3.8.3 for 2.0.

@Xymmer Xymmer closed this as completed Jun 27, 2020
@Xymmer Xymmer modified the milestones: 2.x, 2.0 Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants