lib/class.js
function Class(name, definition, parent) {

  // Argument shifting.
  if (typeof name == 'function') {
    parent = definition;
    definition = name;
    name = null;
  }
  this.definition = definition;
  this.parent = parent;

  // Create the constructor, add some methods to it, and store the association.
  this.Ctor = createConstructor(name);
  this.Ctor.subclass = subclass;
  this.Ctor.final = final;
  constructorToClassMap.set(this.Ctor, this);

  this._setupInheritance();
  this._storeSecrets();
  this._makeAccessors();
}
function Class(name, definition, parent) {

  // Argument shifting.
  if (typeof name == 'function') {
    parent = definition;
    definition = name;
    name = null;
  }
  this.definition = definition;
  this.parent = parent;

  // Create the constructor, add some methods to it, and store the association.
  this.Ctor = createConstructor(name);
  this.Ctor.subclass = subclass;
  this.Ctor.final = final;
  constructorToClassMap.set(this.Ctor, this);

  this._setupInheritance();
  this._storeSecrets();
  this._makeAccessors();
}
function Class ( name , definition , parent ) { // Argument shifting. if ( typeof name == 'function' ) { parent = definition ; definition = name ; name = null ; } this . definition = definition ; this . parent = parent ; // Create the constructor, add some methods to it, and store the association. this . Ctor = createConstructor ( name ) ; this . Ctor . subclass = subclass ; this . Ctor . final = final ; constructorToClassMap . set ( this . Ctor , this ) ; this . _setupInheritance ( ) ; this . _storeSecrets ( ) ; this . _makeAccessors ( ) ; }
A Class.
@constructor
@param {string} name An optional function name given to the produced
constructor. This can be useful for debugging purposes.
@param {Function} definition An optional function used to define the new
constructor.
@param {Class} parent An optional parent Class instance to extend from.
This parameter is only used internally.
A Class .