-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Referencing constructor params is not handled #13
Comments
Hey, I appreciate your feedback! Looks like a bug. Would you like to make fixes for this issue as well? |
I'll try to work out a fix this week. |
@mad-gooze I work on the Firebase SDKs (https://github.com/firebase/firebase-js-sdk) and am trying to evaluate whether we can use this library as a starting ground for minification. Unfortunately, this issue is a major blocker for us. At first glance, the fix does not seem to be super straightforward, as your test case illustrates:
I don't want to duplicate our efforts and would like to know if you have already started looking into this and could use help? |
Hey @schmidt-sebastian, thank you for reaching out.
@mad-gooze could you please tell whether you've started on the fix for this issue or I could fix it instead?
Actually here we can use type checker from the program to detect if one of the symbol's declaration is ctor parameter with |
@mad-gooze ping |
sorry guys, fix is ready #14 |
fix referencing constructor params in constructor body (fixes #13)
@mad-gooze thank you a lot for your work on this! All PRs are just merged into master. Give me some time and I'll release the new version (I'll comment here about it). |
Looks like for now we can remove some unnecessary code (which is covered by new check), see f317645 🎉 |
Version 0.3.0 has been released just now. npmjs - https://www.npmjs.com/package/ts-transformer-minify-privates/v/0.3.0. |
Hi! Thanks for a nice lib!
I am trying to use it in my project, and I've found an issue with constructor params.
Please see a unit test in #12
It is broken now - https://github.com/mad-gooze/ts-transformer-minify-privates/blob/reference-ctor-params-unit-test/tests/test-cases/reference-ctor-params/input.ts#L5 (
privateField
is not replaced so resulting code is incorrect)The text was updated successfully, but these errors were encountered: