I noticed that sealed classes don't get written ou...
# javascript
s
I noticed that sealed classes don't get written out as abstract classes when generating .d.ts files using 1.4-M1. They just get written out as regular classes. I have to remove the sealed modifier and replace it with abstract in Kotlin to get it to generate an abstract class in Typescript. Anyone know if this is deliberate? It'll break all my when-expressions if I can't use sealed classes in my models 😞 I also noticed that my enums didn't survive the translation into .d.ts files. All I see is:
Copy code
/* ErrorDeclaration: Class my.fully.qualified.enum.class.Name with kind: ENUM_CLASS */
I'm new to TS, but I thought it had enums.
youtrack 2
a
@Svyatoslav Kuzmich [JB] FYI: ^
s
Thanks! Sealed classes thing is a bug. Enums are not supported yet.
s
Thanks guys. I raised a ticket for this (the sealed class bit): https://youtrack.jetbrains.com/issue/KT-39193