Basically we run makeTypeScriptGlobal.ts
(both in parent and child) to export module ts
to the variable global.ts
so we can just use ts.
without any imports.
This isn't ideal but if you are willing to do more work to make it easier/safer to use the compiler source send a PR :P.
- get a copy of
microsoft/typescript
and checkoutmaster
. - Copy the
compiler
andservices
folders from the TypeScriptmaster
to here. - Delete the following:
compiler/tsc.ts
as that is not a part ofservices
proper and is used for command line handling which we don't need.compiler/tsconfig.json
services/tsconfig.json
When in debug mode we use the files from these folders. The order of how the files in compiler
is run in the vm
seems very touchy so try to copy that from the services tsconfig.json
.
We use package.json
as its binary as faster. We use the files in this folder to provide the type information for package.json stuff. You can enable a value from debug.ts
to use these files at runtime instead of package.json file for testing out compiler modifications.