nhabuiduc / TypescriptSyntaxPaste

Visual Studio Extension which convert C# SYNTAX to Typescript SYNTAX
70 stars 24 forks source link

Convert members to camcelcase #14

Closed Chris3773 closed 5 years ago

Chris3773 commented 7 years ago

With the Concert members to camelcase option on it does not convert the constructor assigned members to camelcase. This leads to invalid assignment.

Exampe:

public class Foo
{
    public Foo(int id, string name, string boo)
    {
        Id = id;
        Name = name;
        Boo = boo;
    }

    public int Id { get; set; }
    public string Name { get; set; }
    public string Boo { get; set; }
}
export class Foo {
    constructor(id: number, name: string, boo: string) {
        Id = id;
        Name = name;
        Boo = boo;
    }
    public id: number;
    public name: string;
    public boo: string;
}