File tree Expand file tree Collapse file tree 6 files changed +16
-15
lines changed
modules/kxs-ts-gen-core/src
commonMain/kotlin/dev.adamko.kxstsgen
jvmMain/kotlin/dev/adamko/kxstsgen/experiments Expand file tree Collapse file tree 6 files changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -91,14 +91,3 @@ data class KxsTsConfig(
9191
9292 }
9393}
94-
95-
96- @Target(
97- AnnotationTarget .CLASS ,
98- AnnotationTarget .PROPERTY ,
99- AnnotationTarget .FUNCTION ,
100- AnnotationTarget .TYPEALIAS
101- )
102- @RequiresOptIn(level = RequiresOptIn .Level .WARNING )
103- @MustBeDocumented
104- annotation class UnimplementedKxTsGenApi
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ fun interface TsElementConverter {
1515 descriptor : SerialDescriptor ,
1616 ): TsElement
1717
18+
1819 open class Default (
1920 val elementIdConverter : TsElementIdConverter ,
2021 val mapTypeConverter : TsMapTypeConverter ,
@@ -48,7 +49,6 @@ fun interface TsElementConverter {
4849 else -> convertInterface(descriptor, null )
4950 }
5051
51-
5252 PolymorphicKind .SEALED -> convertPolymorphic(descriptor)
5353
5454 // TODO handle contextual
@@ -62,6 +62,7 @@ fun interface TsElementConverter {
6262 }
6363 }
6464
65+
6566 fun convertPolymorphic (
6667 descriptor : SerialDescriptor ,
6768 ): TsDeclaration {
Original file line number Diff line number Diff line change 1+ package dev.adamko.kxstsgen
2+
3+ @Target(
4+ AnnotationTarget .CLASS ,
5+ AnnotationTarget .PROPERTY ,
6+ AnnotationTarget .FUNCTION ,
7+ AnnotationTarget .TYPEALIAS
8+ )
9+ @RequiresOptIn(level = RequiresOptIn .Level .WARNING )
10+ @MustBeDocumented
11+ annotation class UnimplementedKxTsGenApi
Original file line number Diff line number Diff line change 11@file:OptIn(InternalSerializationApi ::class )
22
3- package dev.adamko.kxstsgen
3+ package dev.adamko.kxstsgen.experiments
44
5+ import dev.adamko.kxstsgen.KxsTsConfig
56import kotlinx.serialization.ContextualSerializer
67import kotlinx.serialization.DeserializationStrategy
78import kotlinx.serialization.InternalSerializationApi
Original file line number Diff line number Diff line change @@ -73,6 +73,5 @@ fun interface SerializerDescriptorsExtractor {
7373 .flatMap { it.elementDescriptors }
7474 }
7575 }
76-
7776 }
7877}
Original file line number Diff line number Diff line change 11@file:OptIn(InternalSerializationApi ::class ) // TODO make GitHub issue
2- package dev.adamko.kxstsgen
2+ package dev.adamko.kxstsgen.experiments
33
44import kotlin.reflect.KClass
55import kotlin.reflect.*
You can’t perform that action at this time.
0 commit comments