Repository navigation
Adds 'lib' reference directives - #23893
Merged
Merged
Conversation
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This change adds support for a
/// <reference lib="name" />directive, allowing a file to explicitly include an existing built-in lib file.libreference directive, anyno-default-libreference directive in the lib file is ignored. This is so that alibreference in an imported package won't cause your current project to lose its default lib if you haven't specified one."lib"compiler option in tsconfig.json (e.g. uselib="es2015"and notlib="lib.es2015.d.ts", etc.).In the long term this can help polyfill/shim packages like core-js or es6-shim.
NOTE: Apparently we were very close to running out of heap memory when running
gulp testsafter runninggulp cleanas gulp is holding onto too much memory. Individually each task is fine, but in concert they add up to a large amount of uncollected memory. To address this, I've added a script to run some of our builds out-of-process. This is not an issue in thejakebuilds.Fixes #15732.
Supersedes #15780