The ScalaTsPlugin processes ScalaJS sources and generates a corresponding TypeScript Declaration File.


The scala-ts folder contains an SBT project for building the plugin (readme).

The test folder contains a project that uses the plugin and includes a number of unit tests (readme).

Previous work on creating TypeScript Declaration Files


  1. ScalaJS and Typescript: an unlikely romance


  1. scala-ts/scala-ts; based on scala.reflect; uses IR (ScalaModel, TypeScriptModel); methods are not considered; last release 2017;
  2. code-star/scala-tsi; based on macros and implicit machinery; generates a Scala class first, that in turn generates the TypeScript declaration file;
  3. waveinch/sbt-scalajs-ts-export; based on Scala Meta trees; direct, but basic mapping;
  4. davegurnell/bridges; based on shapeless; main focus: ADTs; methods are not considered; uses IR;
  5. sherpal/scala-ts; based on semanticdb; experimental state