-
Notifications
You must be signed in to change notification settings - Fork 16
KotlinJS
Ruby Lichtenshtein edited this page Nov 7, 2018
·
4 revisions
-
Kotlin provides the ability to target JavaScript. It does so by transpiling Kotlin to JavaScript. The current implementation targets ECMAScript 5.1 but there are plans to eventually target ECMAScript 2015 as well.
-
this excludes the JDK and any JVM or Java framework or library used.
-
Interacting with DOM elements. Kotlin provides a series of statically typed interfaces to interact with the Document Object Model, allowing creation and update of DOM elements.
-
Interacting with graphics such as WebGL. You can use Kotlin to create graphical elements on a web page using WebGL.
- Working with server-side technology. You can use Kotlin to interact with server-side JavaScript such as Node.js you can convert TypeScript definitions from the Definitely Typed type definitions repository to Kotlin using the ts2kt tool. Alternatively, you can use the dynamic type to access any framework without strong typing.
- Converter of TypeScript definition files to Kotlin declarations
- Being a statically typed language, Kotlin still has to interoperate with untyped or loosely typed environments, such as the JavaScript ecosystem. To facilitate these use cases, the
dynamic
type is available in the language.
- Inline JavaScript.
-
external
modifier. - Dynamic Type
- ts2kt
- Representing Kotlin types in JavaScript.
- @JsName annotation.
-
Multiplatform motivation
-
Kotlin targets
-
- Client-side JS
- Server-side JS
- KotlinJS Interop.
- Testing.
-
Kotlin Native
- Why Kotlin/Native?
- Target Platforms
- Testing.
-
-
- Platform-Specific Declarations - expected/actual mechanism
- Common module.
- Architecture.
- Testing.