src code

class method SpahQL_classExtend

.SpahQL_classExtend(name, superKlass[, constructor][, klassProps][, instanceProps]) → Function
  • name (String) – The name for the new Spah class without the “Spah” namespace. E.g. to create SpahQL.Foo.Bar, use classCreate(“Foo.Bar”)
  • superKlass (Function) – The class to be extended non-destructively.
  • constructor (Function) – The constructor function for this class. If not provided, will search the prototype chain for “init”
  • klassProps (Object) – A hash of class-level properties and functions
  • instanceProps (Object) – A hash of instance-level properties and functions to be applied to the class’ prototype.

Creates a new class that extends another class. Follows the same rules as SpahQL_classCreate. The superclass does not need to be a part of the Spah package.