Can I tell the Closure compiler to, for specific types only, stop renaming properties?

前端 未结 1 1081
野的像风
野的像风 2021-01-12 09:46

This question follows: Why does Closure compiler rename properties of an extern type? John\'s answer to that question brings up this second question.

If I declare t

相关标签:
1条回答
  • 2021-01-12 10:28

    The Closure Compiler can rename based on types: https://github.com/google/closure-compiler/wiki/Type-Based-Property-Renaming This enhances other optimizations such as inlining and dead code removal as well. This is used internally to Google but comes with a cost as it can introduce some hard debug scenarios if you "lie" in your type declarations.

    0 讨论(0)
提交回复
热议问题