timocov / ts-transformer-minify-privates

A TypeScript custom transformer which renames private class members
MIT License
52 stars 5 forks source link

Handle destructuring of this type #3

Closed timocov closed 5 years ago

timocov commented 5 years ago
class FooBar {
    private privateField: string = 'sda';

    public publicMethod(): void {
        const { privateField } = this; // should correct handle this
        this.privateMethod(privateField);
    }

    private privateMethod(a: string): void {

    }
}
timocov commented 5 years ago

Test case - 8e190810b4b7dfdb2dc91e446e65e838ef7da039

timocov commented 5 years ago

Fixed in f8a9c74aaa407dc0dd4149a300b9b5e86efd50e1