GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Adds 'lib' reference directives by rbuckton · Pull Request #23893 · microsoft/TypeScript Conversation
Contributor
This change adds support for a
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
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Ron Buckton (rbuckton)
requested review from
a user,
Mohamed Hegazy (mhegazy) and
Wesley Wigham (weswigham)
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. #23904 Could avoid repeated code here
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you want me to do this or do you want to do in your other PR once this is merged?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll close the other PR since it doesn't have much benefit with only 2 branches, but maybe it would have a benefit with 3 branches, or there's a better way to share the code.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Ron Buckton (rbuckton)
force-pushed
the
libReference
branch
from
ce2f777 to
68c0e52
Compare
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll add a test, but this shouldn't break because there is still an overload that supports
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Ron Buckton (rbuckton)
force-pushed
the
libReference
branch
from
7d5c1bc to
99cb2ad
Compare
Ron Buckton (rbuckton)
force-pushed
the
libReference
branch
from
99cb2ad to
698f229
Compare
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was this intentional?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure what caused that to change, but I'll revert.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i would just add this to the map. chances are no one will ever include it.. and if they did.. it does not break anything.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// <reference lib="dom" /> | ||
| /// <reference lib="webworker.importscripts" /> | ||
| /// <reference lib="scripthost" /> | ||
| /// <reference lib="dom.iterable" /> No newline at end of file |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
nit. i would move this just after dom
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @@ -1,3 +1,5 @@ | |||
| /// <reference lib="webworker.importscripts" /> | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
this is not needed here, the file is autogenerated, and it already has the correct definition. we add it to lib.d.ts to partially allow the lib to be used in webworkers for simple cases..
the two files dom and webworker have too many conflicts in between them, and can not be loaded together in the same context anyways..
so I would just revert the changes to this file, and leave it as is.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| "es5.full": "lib.d.ts", | ||
| "es2015.full": "lib.es6.d.ts" | ||
| }, | ||
| "sources": { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
can we remove the support for sources from jake and gulp as well.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| /* @internal */ | ||
| export const compileOnSaveCommandLineOption: CommandLineOption = { name: "compileOnSave", type: "boolean" }; | ||
|
|
||
| // NOTE: The order here is important to default lib ordering |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
i would expand on this comment and say that the order of the list here is the same order the lib files have in the generated program, and add a note to see use in createProgram
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| } | ||
|
|
||
| export function getReferenceAtPosition(sourceFile: SourceFile, position: number, program: Program): { fileName: string, file: SourceFile } | undefined { | ||
| debugger; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
remove
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
one debugger statement that needs to be removed
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Great job with this PR! The diff won't load for me so I'll just ask here 🤔 ... Does this PR actually implement For more context see: #23339 (comment) Thanks! 👍 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
lib folder should go down by 4 MB or so. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Mohamed Hegazy (@mhegazy) Ron Buckton (@rbuckton) This is going to be a big break to API consumers loading just |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
You could always just use an older copy of the lib, if you're one of those API consumers. We ship the latest one with the latest features for consumers, but if you have constraints that force you to, usually you can just include an older copy of the lib in your project - a bunch of our older RWC tests do that. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
If we get feedback on that we can ship an all in one file as well. The biggest issue is tool authors really, like TS-loader for instance. Most users use the built in lib with no changes. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Will it add the library to the entire program or only from the reference point and downward? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
not sure i understand the question. the only difference is instead of on file |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ron Buckton (@rbuckton) Mohamed Hegazy (@mhegazy) this has broken our own build because Now |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Looks like we need to ignore |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'll take a look. Lib refs are supposed to ignore noResolve. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This had nothing to do with |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Suggestion: Add "lib" reference directive
There was an error while loading. Please reload this page.