Typescript ^v5.3.3
Loading editor...
class Double { private double: number constructor(number = 0) { this.double = number } add(b: Double | number): Double { if(typeof b === "number") return new Double(this.double + b) else return new Double(this.double + b.double) } }
Civet output - ts2civet v1.0.0-beta.10
Loading editor...
class Double private double: number @(number = 0) @double = number add(b: Double | number): Double if b <? "number" return new Double(@double + b) else return new Double(@double + b.double)