-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Add support for 'lib' reference directive #15780
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
Closed
Closed
Changes from 5 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
9e22efe
Add support for 'lib' reference directive
rbuckton f61beb1
Update baseline, PR feedback
rbuckton f1fe66e
Merge branch 'master' into libReferenceDirective
rbuckton 2f8ae00
Address PR feedback
rbuckton 8a7abbf
Merge branch 'master' into libReferenceDirective
rbuckton 47ed6cc
Merge branch 'master' into libReferenceDirective
rbuckton 255e733
Merge branch 'master' into libReferenceDirective
rbuckton 296cf84
Merge branch 'master' into libReferenceDirective
rbuckton 295f3c1
Swap reference paths to lib
rbuckton 32dd033
Switch built-in libs to use lib refs
rbuckton 55ca456
Merge branch 'master' into libReferenceDirective
rbuckton e9818b4
single source for libs
rbuckton d42a77b
Merge branch 'master' into libReferenceDirective
rbuckton 2587d05
Simplify libs.json
rbuckton 402d08d
Merge branch 'master' into libReferenceDirective
rbuckton a6508c6
Fix merge conflict
rbuckton e1a9b74
Fix isRecognizedTripleSlashComment
rbuckton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This just maps
x
tolib.x.d.ts
. Could be a function instead, combined with a set of allowed libs.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This must be a Map to be used in the compiler option I pulled it from, below. If I added a function then we would have yet another place to maintain this list (in addition to the jakefile/gulpfile).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would still be nice to generate this instead of writing it explicitly. Start with
const libs = ["es5", ..., "esnext.asynciterable"]
, generate the map withlib.${x}.d.ts
, and you'll no longer need to usearrayFrom(libMap.keys())
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for the outliers like
"es6"
and"es7"
which are aliases.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we leave
libMap
as is, and add:export const libs = arrayFrom(libMap.keys());