Closed
Description
Instead of
@Serializable
class Tiles(
val tiles: List<Tile>,
)
@Serializable
data class Tile(
val x: Int,
val y: Int,
val type: String,
)
being converted to
interface Tiles{
tiles: Tile[];
}
interface Tile{
x: Int;
y: Int;
type: string;
}
type Int = number
instead create a tuple, because it's more compact when it's encoded to JSON.
Something like...
@Serializable(with = TupleSerializer::class)
data class Tile(
val x: Int,
val y: Int,
val type: String,
)
type Tile = [Int, Int, string]
This would also provide a good demonstration of how the generated Typescript is affected by custom descriptors.
Metadata
Metadata
Assignees
Labels
No labels