vscode-gengetset icon indicating copy to clipboard operation
vscode-gengetset copied to clipboard

Getter and setter using constructor too

Open lmame opened this issue 6 years ago • 0 comments

Hi :)

Would it be possible to allow Getter / Setter generation from the constructor as well rather than only class declaration?

For example extension works great if declaring the vars:

export class test{  
    private arg1: number;  
    private arg2: number;  
    // ...  
}

But It also possible to do the same in the constructor method:

export class test{
    constructor(private arg1: number, private arg2: number) {
    }
    // ...
}

It would be cool if the extension would detect the second version as well ^_^

lmame avatar Apr 03 '18 23:04 lmame