ios-jsc icon indicating copy to clipboard operation
ios-jsc copied to clipboard

[Feature Request] Provide ability to specify native class name when using TS extend

Open PeterStaev opened this issue 8 years ago • 0 comments

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:

  1. Have a static property (ObjCClassName) that will be used, if present, as the name of the native class.
  2. Evaluate and use the name property of the JS class. Although this is readonly it can be overridden with Object.defineProperty(Foo, "name", { value: "Bar" })

PeterStaev avatar Apr 25 '17 20:04 PeterStaev