Converter of TypeScript definition files to Kotlin declarations
This requires JRE 1.6+ to run. It generates Kotlin files that are compatible with Kotlin 1.1+ (generated declarations are tested against latest stable compiler version)
The simplest way to use is install the latest version form npm:
npm install -g dukat
dukat [<options>] <d.ts files>
where possible options include:
-p <qualifiedPackageName> package name for the generated file (by default filename.d.ts renamed to filename.d.kt)
-m String use this value as @file:JsModule annotation value whenever such annotation occurs
-d <path> destination directory for files with converted declarations (by default declarations are generated in current directory)
-v, -version print version
- clone this project
# on Windows-based platforms set following: `git config core.autocrlf true`
git clone <this project url>
- build
./gradlew build
- (optional) Run unit tests
./gradlew test -Pdukat.test.failure.always
- [descriptors] support for
inline
andcrosslinine
modifiers in descriptors - [typescript] Inlined invoke extension function can have return type
- [typescript] Merge vars and interfaces even if they are in different files (but in the same package)
- [typescript] Merge classlikes correctly (under some conditions they were copied after merge)
- [typescript] Preserve type params while resolving this return type in extension functions
- [build] make it possible to build with arbitrary version of kotlin compiler
- [build] typescript compiler version updated to 3.5.3
- [descriptors] support for compiling with 1.3.70-eap-42
- [typescript] Move top level declarations into a separate file whenever it's invalid to keep them with the rest of declarations (that is, when there's file-level JsQualifier or JsModule annotations)
- [idl] Don't add import for the same package this file belongs to