function ScopeInstance (containing_scope, creating_scope, input_computables) {
  if (containing_scope === creating_scope) {
    throw new Error("Cannot instantiate same Scope that ScopeInstance is residing in");
  }

  this._creating_scope = creating_scope;

  this._async_field_names = [];
  this._sync_field_names = [];

  this._field_name_references = {};

  var i;
  var field_name;

  var output_type = creating_scope.get_output_type();
  ScopeCreator.call(this, containing_scope, input_computables, output_type);

  if (creating_scope.get_input_count() !== input_computables.length) {
    throw new Error("Incorrect number of input computables provided, expected "+creating_scope.get_input_count()+" got "+input_computables.length);
  }

  creating_scope.emit('instance_added', this);
}
/**
 * @constructor
 * @emits Scope#instance_added
 * @extends ScopeCreator
 * @param {Scope} containing_scope The scope that will contain this scope instantiation.
 * @param {Scope} creating_scope The scope definition that will be created when this computable is brought into existence.
 * @param {Array.<Computable>} input_computables The Computables to be passed to the Scope.
 */
@constructor
@emits Scope#instance_added
@extends ScopeCreator
@param {Scope} containing_scope The scope that will contain this scope instantiation.
@param {Scope} creating_scope The scope definition that will be created when this computable is brought into existence.
@param {Array.} input_computables The Computables to be passed to the Scope.
@constructor @emits Scope#instance_added @extends ScopeCreator @param { Scope } containing_scope The scope that will contain this scope instantiation . @param { Scope } creating_scope The scope definition that will be created when this computable is brought into existence . @param { Array . } input_computables The Computables to be passed to the Scope .
function ScopeInstance (containing_scope, creating_scope, input_computables) {
  if (containing_scope === creating_scope) {
    throw new Error("Cannot instantiate same Scope that ScopeInstance is residing in");
  }
  this._creating_scope = creating_scope;
  this._async_field_names = [];
  this._sync_field_names = [];
  this._field_name_references = {};
  var i;
  var field_name;
  var output_type = creating_scope.get_output_type();
  ScopeCreator.call(this, containing_scope, input_computables, output_type);
  if (creating_scope.get_input_count() !== input_computables.length) {
    throw new Error("Incorrect number of input computables provided, expected "+creating_scope.get_input_count()+" got "+input_computables.length);
  }
  creating_scope.emit('instance_added', this);
}
function ScopeInstance ( containing_scope , creating_scope , input_computables ) { if ( containing_scope === creating_scope ) { throw new Error ( "Cannot instantiate same Scope that ScopeInstance is residing in" ) ; } this . _creating_scope = creating_scope ; this . _async_field_names = [ ] ; this . _sync_field_names = [ ] ; this . _field_name_references = { } ; var i ; var field_name ; var output_type = creating_scope . get_output_type ( ) ; ScopeCreator . call ( this , containing_scope , input_computables , output_type ) ; if ( creating_scope . get_input_count ( ) !== input_computables . length ) { throw new Error ( "Incorrect number of input computables provided, expected " + creating_scope . get_input_count ( ) + " got " + input_computables . length ) ; } creating_scope . emit ( 'instance_added' , this ) ; }
@constructor
 @emits Scope#instance_added
 @extends ScopeCreator
 @param {Scope} containing_scope The scope that will contain this scope instantiation.
@constructor @emits Scope#instance_added @extends ScopeCreator @param { Scope } containing_scope The scope that will contain this scope instantiation .