Is there a way to stop mangling names for a class/...
# javascript
a
Is there a way to stop mangling names for a class/interface?
s
Yes! It can be done using JsName or experimental JsExport
👍 1
t
Is it possible to disable mangling without exporting?
s
JsName does that
t
What about whole class/interface (without name duplication)?
🚫 1
☝️ 1
s
What are your use-cases for “JsExport but without export”?
Is it for calling external API that expects certain names?
t
0. “missed” members in declarations Last example -
HTMLElement
has more abstract members 1. Like entities For example if you have
x, y, width, height
you become rect like and can be converted to Rect class 2. Templates
Is it for calling external API that expects certain names?
Yes, for example it can be used in templates like this
s
Thanks! I’m thinking that we would also need let IR DCE know that these would be used externally so it would keep them alive.
t
One more example - template converters