Skip to content

Property order is not preserved with TypeScript input #898

Description

@dvdsgl

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions