Given TypeScript input (share link):
class A {
name: string;
age: number;
}
I get the following output in Swift:
struct A {
let age: Double
let name: String
}
This is undesirable for a few reasons, the major reason is that A has a default initializer A(age: _, name: _) that contradicts the TypeScript property order.
Given TypeScript input (share link):
I get the following output in Swift:
This is undesirable for a few reasons, the major reason is that
Ahas a default initializerA(age: _, name: _)that contradicts the TypeScript property order.