You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Double and Int are both converted directly to number. This is confusing on the TypeScript side.
@Serializable
data classPosition(
valx:Double,
valy:Double,
vallevel:Int,
)
// generatedexportinterfacePosition{x: number;y: number;level: number;// level looks the same as x and y, but if I produce a JSON message with 1.5, KXS will error}
Unsigned numbers (because they are value classes) are converted to type aliases, e.g.
In TypeScript this isn't safe (UInt can accept any numeric value, despite its name) - but it gives a good indication, and can be enhanced with brand typing (#7).
Can the other numeric primitives be exported as type aliases?