LambdaConstructor

constructor(scope: Scriptable, name: String, length: Int, target: SerializableConstructable)

Callable both with and without new, and either way it returns a wired-up new object.


constructor(scope: Scriptable, name: String, length: Int, flags: Int, target: SerializableConstructable)

flags says which of new and a direct call are allowed. Whichever is allowed behaves the same way; the other throws a TypeError.


constructor(scope: Scriptable, name: String, length: Int, target: SerializableCallable?, targetConstructor: SerializableConstructable?)

Behaves differently with and without new: new returns a wired-up object, a direct call does whatever target says. Date is the standard example.


constructor(scope: Scriptable, name: String, length: Int, prototype: Any?, target: SerializableCallable?, targetConstructor: SerializableConstructable?)