When required, it returns a monkey-patched version of the peer typescript module.
The only change is the transpileModule function. It will cache results on disk,
so subsequent invocations should be much faster.
Caching requires, and will only work, when the following requirements are met.
If these requirements are not met, caching will be silently skipped. If you
wonder why your builds aren't getting faster, you might be violating these
requirements.
Filenames are included in the cache keys. Normally these are absolute. If you want
to bundle a pre-generated cache with your code, the cache will need to use relative
paths instead. Set env var TS_CACHED_TRANSPILE_PORTABLE to true to enable this
behavior.