fix: make sealed classes abstract inside d.ts files.

This commit is contained in:
Artem Kobzar
2022-05-04 11:24:47 +00:00
committed by Space
parent a2b40acc98
commit 729e24d053
3 changed files with 3 additions and 3 deletions
@@ -356,7 +356,7 @@ class ExportModelGenerator(
val exportedClass = ExportedClass( val exportedClass = ExportedClass(
name = name, name = name,
isInterface = klass.isInterface, isInterface = klass.isInterface,
isAbstract = klass.modality == Modality.ABSTRACT, isAbstract = klass.modality == Modality.ABSTRACT || klass.modality == Modality.SEALED,
superClass = superType, superClass = superType,
superInterfaces = superInterfaces, superInterfaces = superInterfaces,
typeParameters = typeParameters, typeParameters = typeParameters,
@@ -62,7 +62,7 @@ declare namespace JS_TESTS {
get x(): number; get x(): number;
}; };
} }
class TestSealed { abstract class TestSealed {
protected constructor(name: string); protected constructor(name: string);
get name(): string; get name(): string;
} }
@@ -216,7 +216,7 @@ class OuterClass {
} }
@JsExport @JsExport
class KT38262 { open class KT38262 {
fun then(): Int = 42 fun then(): Int = 42
fun catch(): Int = 24 fun catch(): Int = 24
} }