Show:

Provides OOP utilities.

Index

Methods

Methods

extend

(
  • receiver
  • supplier
  • protoProps
  • staticProps
)
Function static

Sets the prototype, constructor and superclass properties to support an inheritance strategy that can chain constructors and methods. Static members will not be inherited.

Parameters:

  • receiver Function

    The class which will extend another class.

  • supplier Function

    The class which will provide the properties the child class.

  • protoProps Object

    Prototype properties to add/override.

  • staticProps Object

    Static properties to add/overwrite.

Returns:

Function:

The extended class.