Skip to content
/ tracer Public

A VSCode extension to measure type complexity within a project.

License

Notifications You must be signed in to change notification settings

tsperf/tracer

Repository files navigation

Type Complexity Tracer

Visual Studio Marketplace Version

A VSCode extension to measure type complexity within a project.

🚧 It is a work in progress - help is wanted! 🚧

How it works

To avoid the overhead of launching a separate tsserver, it currently queries the VSCode language server to get information about every token in an open file, and uses the timings of the responses as a proxy for the complexity of the types, following the pattern of @definitelytyped/perf.

Help wanted

  • Improve UX/API of the plugin - for example, add settings to disable/customise how data is displayed to the user
  • Investigate the possibility of running a TypeScript trace and consuming this data (which would be much more reliable but might take longer)
  • Investigate persistent worker threads that watch changes in a project and update asynchronously (and do not need to reinitialise TypeScript)
  • See if it is possible to get extended diagnostics or other diagnostic data from the compiler or tsserver APIs

License

MIT License © 2024 Aleksandra Sikora and Daniel Roe