ts-transformer-properties-rename
ts-transformer-properties-rename copied to clipboard
Add loose mode
Currently the transformer trying to figure out visibility type of every particular node, what allows minify properties better.
Needs to add "loose" mode, what will use the only name of the property (rather that type/symbol) to detect visibility type.
For example,
export interface Foo {
prop: number;
}
export class Bar implements Foo {
prop: number = 123;
}
class Baz {
prop: number = 321;
}
In the current mode we'll rename Baz::prop to Baz::_internal_prop, but Bar::prop will be unchanged.
In "loose" mode we won't rename Baz::prop, because there is another "public" property with the same name prop (but in Bar class). So, we'll just pop-up all "public" properties and use that set of names only.