Skip to content
Converter of <any kind of declarations> to Kotlin external declarations
Kotlin WebIDL TypeScript Other
Branch: master
Clone or download
Latest commit 3c7b938 Sep 20, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea/runConfigurations Run configuration for CoreSetCliTests Sep 20, 2019
ast-common Don't use starred import in idl subprojects Jul 31, 2019
ast-model New naming rules for the generated content Sep 19, 2019
cli Allow automatic publishing to bintray Sep 17, 2019
compiler Introduce CoreSetCliTests Sep 20, 2019
gradle/wrapper Update gradle version to 5.6.2 Sep 13, 2019
idl [idl] Support for mixins Aug 22, 2019
interop [build] Don't set srcDirs in subprojects Jun 2, 2019
itertools Use logger instead of printing directly to stdout anywhere apart from… Jun 26, 2019
license Remove j2v8 interop js backend completely May 29, 2019
logging Serialize AST on nodejs side Aug 15, 2019
model-lowerings Make it possible to set org.slf4j.simpleLogger.defaultLogLevel from g… Sep 20, 2019
module-name-resolver DUKAT-4: module name resolving is based only on existence of package.… Sep 18, 2019
node-package dukat@0.0.18 Sep 20, 2019
ownerContext Escape identificators at models phase Jul 15, 2019
panic [build] Don't set srcDirs in subprojects Jun 2, 2019
translator-string Minimal clash resolution for generated entities Sep 20, 2019
translator Move all ts-specific modules to typescript folder Aug 22, 2019
typescript Minimal logLevel support for logger used on ts side Sep 20, 2019
.gitignore Enable typescript API completion in IDE Aug 22, 2019
CHANGELOG.md dukat@0.0.18 Sep 20, 2019
README.md dukat@0.0.18 Sep 20, 2019
build.gradle Introduce allWarningsAsErrors = true flag to the compiler options Aug 21, 2019
gradlew Update gradle version to 5.6.2 Sep 13, 2019
gradlew.bat Update gradle version to 5.6 Aug 21, 2019
settings.gradle Introduce minimal test set for testing CLI directly Sep 10, 2019

README.md

Description

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)

How to install

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

npm install -g dukat

Usage

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

How to setup and build

  1. clone this project
git clone <this project url>
  1. build
./gradlew build
  1. (optional) Run unit tests
./gradlew test -Pdukat.test.failure.always

Recent Changes

[0.0.18] - 20'September, 2019

Starting from this release generated files names will match following pattern:

[file_name].[packageName]?.[module_name]?.[additional_postfix]

For instance, let's say we have file foo.d.ts in fooController package, and following file is generated: foo.helpers.module_fooController.kt. Then we know that the original file was called foo.d.ts, the file itself belongs to the package "helpers" and npm module is fooController.

[0.0.17] - 16'September, 2019

  • This release contains mainly idl-related changes. The idl target is considered production-ready, however its support is still experimental.

see full CHANGELOG

Useful links

You can’t perform that action at this time.