Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property order is not preserved with TypeScript input #898

Open
dvdsgl opened this issue Jun 13, 2018 · 1 comment
Open

Property order is not preserved with TypeScript input #898

dvdsgl opened this issue Jun 13, 2018 · 1 comment
Labels
TypeScript TypeScript Output

Comments

@dvdsgl
Copy link
Member

dvdsgl commented Jun 13, 2018

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.

@schani
Copy link
Member

schani commented Jun 18, 2018

This depends on #336 and might also require modifying typescript-json-schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TypeScript TypeScript Output
Projects
None yet
Development

No branches or pull requests

2 participants