TeamCity (simple build status)


Converter of TypeScript definition files to Kotlin declarations

This requires Kotlin 1.1.x to run. It generates Kotlin files that are compatible with Kotlin 1.1+.

How to use

The simplest way to use is install the latest version form npm:

npm install -g ts2kt


ts2kt [<options>] <d.ts files>

Where possible options include:
-d <path> Destination directory for files with converted declarations, current directory is used by default
-h Print a synopsis of standard options
-X Print a synopsis of advanced options

How to setup project

  1. clone this project
      git clone <this project url>
  2. get submodules (
      git submodule init
      git submodule update
  3. Build javascript target (and run the unit tests)
./gradlew build
  1. (optional) Run the unit tests
./gradlew test
  1. Run the tool in one of these ways:
    • Run it with node.js (Note: the root of the project should be working dir):
     node build/distrib/ts2kt.js path/to/input.d.ts path/to/output.kt
         * Directly call translateToFile_puj7f4$ from JS (translateToFile in code).
         * Create run configuration like shared jq and run it.
How to update submodules
  git submodule update --remote

Useful links

Related Libraries


Headless Chrome DevTools Protocol Client (RxJava2 + Kotlin)

Last updated 3 mins ago


A small framework for writing client-side web-applications in Kotlin

Last updated 3 mins ago


Kotlin logging, both js and jvm

Last updated 3 mins ago


A native version of pixi

Last updated 3 mins ago


Develop browser games in Kotlin

Last updated 3 mins ago