You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It means that TS compiles as if there was no declare key word written:
class A {
private b: number;
}
class C {
private declare d: number;
}
When I use the TS-transformer-minify-privates both these classes output the same js code with Object.defineProperty in the contructor. Class C should not do so.
Hi, thanks for this amazing effort!
I did notice that when using
useDefineForClassFields
on TS config plusdeclare
when I add your transformer to the code it removes thedeclare
.Example code:
https://www.typescriptlang.org/play?useDefineForClassFields=true#code/MYGwhgzhAEBCYBdFmgbwLAChrQA4FcAjEAS2GgBMBTUMAJyrwHskEmAuaCBOkgOwDmAbiw5cvAG6JG1Wg2jB6dFiOwKmfbnXzA2dABQBKNKJwKlLaAF5oAIluqcAXywvMWWlGgB5PiQ0magTEZMysHFw8-MKm4iRSCIyKdMoI1nYOrkA
The text was updated successfully, but these errors were encountered: