Skip to content

Update typescript to the latest version 🚀 #224

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

Merged
merged 5 commits into from
Sep 5, 2017

Conversation

greenkeeper[bot]
Copy link

@greenkeeper greenkeeper bot commented Aug 31, 2017

Version 2.5.2 of typescript just got published.

Dependency typescript
Current Version 2.4.2
Type devDependency

The version 2.5.2 is not covered by your current version range.

Without accepting this pull request your project will work just like it did before. There might be a bunch of new features, fixes and perf improvements that the maintainers worked on for you though.

I recommend you look into these changes and try to get onto the latest version of typescript.
Given that you have a decent test suite, a passing build is a strong indicator that you can take advantage of these changes by merging the proposed change into your project. Otherwise this branch is a great starting point for you to work on the update.


Release Notes TypeScript 2.5

For release notes, check out the release announcement

For new features, check out the What's new in TypeScript 2.5.

For the complete list of fixed issues, check out the issues fixed in TypeScript 2.5 RC and after TypeScript 2.5 RC.

Download:

Special thanks to all contributors to this release:

  • Anders Hejlsberg
  • Andrew Casey
  • Andy Hanson
  • Arthur Ozga
  • Basarat Ali Syed
  • Benjamin Lichtman
  • Daniel Rosenwasser
  • Francois Wouts
  • Jan Melcher
  • Kanchalai Tanglertsampan
  • Klaus Meinhardt
  • Kārlis Gaņģis
  • Matt Mitchell
  • Mine Starks
  • Mohamed Hegazy
  • Nathan Shively-Sanders
  • Paul van Brenk
  • Ron Buckton
  • Ryan Cavanaugh
  • Sheetal Nandi
  • Tingan Ho
  • Tycho Grouwstra
  • Wesley Wigham
Commits

The new version differs by 652 commits ahead by 652, behind by 75.

  • 171c664 Update LKG
  • 20da159 Merge pull request #18127 from RyanCavanaugh/port18120_release25
  • 6425ea2 Don't crash when a JS file appears in an inferred context
  • 6ffe829 Update LKG
  • 15a0d3f Update version
  • 2a2773f Update LKG
  • 187a21c Fix crash in name resolution with custom transforms and emitDecoratorMetadata
  • 62678cd Don't try to extract import to a method: simpler fix (#18054)
  • 3644771 Test for action description of code actions, and simplify description for extracting method to file (#18030) (#18044)
  • a39ae1f Fix crash when attempting to merge an import with a local declaration (#18032) (#18034)
  • 350c9f6 Call dynamic import transform on expression used by export equal statement (#18028) (#18033)
  • 0851f69 Added additional test
  • 01b7df6 Switch to arrow for ts class wrapper IIFE
  • 9bb1915 PR feedback
  • ec8f5cf Follow symbol through commonjs require for inferred class type

There are 250 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

@ikatyang
Copy link
Member

ikatyang commented Sep 4, 2017

@tycho01 It seems the Omit will cause dissoc issues in TS v2.5 (for object with non-explicit keys), I have no idea how to tackle it, should we just skip it? as it works well before 2.5 and now it looks like needs some type-level if..else to determine if it has index signature or not.

R_dissoc(string_property, object)

- "Pick<object, any>"
+ "Pick<object, never>"

R_dissoc(string_property)(object)

- "Pick<object, any>"
+ "Pick<object, never>"
Inferred

  R_dissoc(string_property, string_number_record)

to be

  Pick<Record<string, number>, never>

Inferred

  R_dissoc(string_property)(string_number_record)

to be

  Pick<Record<string, number>, never>

@KiaraGrouwstra
Copy link
Member

@ikatyang: Right. Up to you, I'm cool with delaying either Omit or the upgrade.

needs some type-level if..else to determine if it has index signature or not

So unfortunately that's not possible on TS nightlies yet. It's possible to access a string index T[string], but if it's not (guaranteed to be) there then doing that just results in a type error.

A solution I could think of there is type pattern matching, i.e. that 6606. My PR there is still in progress, but the pattern matching also still suffers from an additional issue... Not helping much right now yet I fear.

You could try reporting the issue as a regression actually.

@ikatyang
Copy link
Member

ikatyang commented Sep 4, 2017

I'd like to delay the upgrade, but there are some bug fixes required by DT tests in TS 2.5. 😰

For the regression issue, I'm not sure if it is a regression since I did not understand its implementation actually, maybe it's caused by the & { [x: string]: never } in Diff?

@KiaraGrouwstra
Copy link
Member

I think things got stricter and it no longer considers object types to have a string index unless they actually do.
I believe before it would accept others as well, implicitly yielding the union of the object's values if you tried accessing the string index.
I'm not sure which version/PR this happened in though, I just noticed the change in behavior like you did.

@ikatyang ikatyang force-pushed the greenkeeper/typescript-2.5.2 branch from 8d01f69 to b3bcf25 Compare September 5, 2017 03:05
@ikatyang ikatyang merged commit 65cd100 into master Sep 5, 2017
@ikatyang ikatyang deleted the greenkeeper/typescript-2.5.2 branch September 5, 2017 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants