-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Add external mapShim/debug modules #33712
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
Conversation
cc: @ahejlsberg as this adds the additional control-flow debug info via an on-demand-loaded external module. |
The |
True, but IE will generally be running typescriptServices.js/typescript.js, which bundles mapShim. This is also the implementation I'm using to shim |
c3eae0a
to
63515b3
Compare
Since tsc.js will never |
006946d
to
a460720
Compare
I lament that Speaking of which, I have a branch where I've improved the |
@weswigham any other thoughts/comments? |
a460720
to
cf38a86
Compare
cf38a86
to
057e184
Compare
@weswigham: Any other feedback or concerns on this? |
This moves
sys.require
from tsserver to compiler so that NodeJS modules can be loaded viasys
if available. This enables us to move theMap
shim out oftsc.js
, since it will be most likely run in a NodeJS environment that already supports it and will cut down on unused code in the command-line compiler. TheMap
shim script is designed such that it can be bundled withtypescriptServices.js
/typescript.js
, allowing it to continue to run in environments that do not support module loading and may not have a nativeMap
implementation.This also enables us to dynamically load extended debugging tools when debugging the compiler without also adding code to the compiler that would be unused in most situations.
As part of this change I also moved all of the general path-manipulation logic out of
utilities.ts
and into a newpath.ts
file. This was motivated by the need to leverage some of the path manipulation logic before we evaluatescanner.ts
/parser.ts
which unconditionally createMap
instances (and therefore would depend onsys.require
and path manipulation already being present).