Fix lib imports that are not compatible with TS6 and later - #361
Open
DavyLandman wants to merge 1 commit into
Open
DavyLandman wants to merge 1 commit into
DavyLandman wants to merge 1 commit into
Conversation
DavyLandman
force-pushed
the
fix/esnext-became-es2027-ts6
branch
from
September 21, 2026 09:23
3d37e1a to
a75e948
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As TS6 was released beginning of this year, old ESNext became ES2025, and new ESNext became ES2027.
But this pulled in some new lib features into tsconfig, that the node engines didn't support yet.
So starting from node22, I reviewed all the libs and using NDM and the lib in the typescript repo I've figured out what the correct libraries are in the TS6+ state of the
libdefinitions.An example is that a call to
Map.getOrInsertComputedwould be considered legal in node22 (as it flowed fromESNext.Collection) even though it's only supported in node 26.I also found 2 missing lib declarations (for node-lts and node26) and fixed them.