Class.addConstructor
Value addConstructor(alias Ctor)(string name = null) if (isCallable!Ctor && is(ReturnType!Ctor : Object)) nothrowAdd a constructor to a Class. If name is empty (null), the class name will be used. After creating the constructor, it needs to be added to an object as a property to be able to use it. Use Context.setValue to make the constructor available in the global object.
Parameters
name | The JSC name of the constructor or null to use the class name |
callback | The callback |
Returns
A Value representing the class constructor