Examples
kxs-ts-gen
can convert @Serializable
Kotlin classes to TypeScript interfaces.
Classes
Polymorphic classes
- Sealed classes (closed polymorphism) are well-supported
- Open polymorphism (abstract class) is handled, but does not produce useful TypeScript
Collections
Customising TypeScript
The generated TypeScript can be customised
Kotlin does not have a direct equivalent of TypeScript tuples, however it is possible to convert a Kotlin class to a TypeScript tuple.