fix: downlevel .d.ts files for compat with older TS versions#9705
fix: downlevel .d.ts files for compat with older TS versions#9705SimenB merged 4 commits intojestjs:masterfrom
Conversation
(101s to 24s on my machine for cached `build:ts`)
Codecov Report
@@ Coverage Diff @@
## master #9705 +/- ##
=======================================
Coverage 64.94% 64.94%
=======================================
Files 288 288
Lines 12184 12184
Branches 3020 3022 +2
=======================================
Hits 7913 7913
Misses 3634 3634
Partials 637 637 Continue to review full report at Codecov.
|
thymikee
left a comment
There was a problem hiding this comment.
That's gonna add a lot of extra code to download through npm :<
|
the definition files aren't that large. But yes, it'll make the package bigger |
|
@thymikee we could do something to replace the 3.8 definitions with 3.4 compatible ones? |
|
If that doesn't degrade DX then I'm all in 👍 |
|
It'll degrade DX for consumers, but not for us (as we'll still work on the source). See caveats (semantics): https://github.com/sandersn/downlevel-dts/blob/master/README.md |
|
Worth it IMO |
|
PR welcome 😀 Last caveat is that we have to ditch (I personally don't care about install size, so I won't be working it.) |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
We shouldn't force consumers to update to TS 3.8. This will downlevel the
d.tsfiles so it works down to TS 3.4.Fixes #9703
Closes #9704
Test plan
I'll publish a canary and try to build with an older version of TS.
EDIT: Seems to work. This is with typescript@3.4.5