Expose tracing module to public API #57477
Labels
API
Relates to the public API for TypeScript
In Discussion
Not yet reached consensus
Suggestion
An idea for TypeScript
π Search Terms
tracing API
β Viability Checklist
β Suggestion
Expose https://github.com/microsoft/TypeScript/blob/main/src/compiler/tracing.ts#L368 so that people using the compilerAPI can use the equivalent of --generateTrace to profile where typescript is spending it's time.
I wanted to see if this is something the Typescript team is interested in supporting. Happy to try and submit the PR myself if amenable to this.
π Motivating Example
When using the compiler API, we can't use the equivalent of --generateTrace to get in-depth information about where typescript is spending it's time
π» Use Cases
Using the compiler API programmatically with a custom CompilerHost that's trying to cache SourcefFiles between invocations (i.e. confirming some work I've been doing around Export SourceFileObject and friends Β #57073)
Typescript already has an internal mechanism to collect these performance metrics and it would be great if programmatic access to this was allowed. In general it'd be great if we could do the equivalent of executeCommandLine with custom CompilerHost (including all the command line only options)
I can locally edit typescript to expose these functions
The text was updated successfully, but these errors were encountered: