ios-jsc
ios-jsc copied to clipboard
[Feature Request] Provide ability to specify native class name when using TS extend
Currently when using the pure-JS extend method, you have ability to specify the name of the Obj-C class that will be created. For the TS extend version this is limited and the current logic always pulls the name of the constructor function. This creates problems when uglify/mangling is used and currently all such classes are excluded from mangling here.
Two possible solutions:
- Have a static property (
ObjCClassName) that will be used, if present, as the name of the native class. - Evaluate and use the
nameproperty of the JS class. Although this is readonly it can be overridden withObject.defineProperty(Foo, "name", { value: "Bar" })