@@ -9,14 +9,15 @@ import {TemplateLoader} from './compiler/template_loader';
99import  { DirectiveMetadataReader }  from  './compiler/directive_metadata_reader' ; 
1010import  { DirectiveMetadata }  from  './compiler/directive_metadata' ; 
1111import  { List ,  ListWrapper }  from  'angular2/src/facade/collection' ; 
12- import  { PromiseWrapper }  from  'angular2/src/facade/async' ; 
12+ import  { Promise ,   PromiseWrapper }  from  'angular2/src/facade/async' ; 
1313import  { VmTurnZone }  from  'angular2/src/core/zone/vm_turn_zone' ; 
1414import  { LifeCycle }  from  'angular2/src/core/life_cycle/life_cycle' ; 
1515import  { ShadowDomStrategy ,  NativeShadowDomStrategy }  from  'angular2/src/core/compiler/shadow_dom_strategy' ; 
1616import  { XHR }  from  'angular2/src/core/compiler/xhr/xhr' ; 
1717import  { XHRImpl }  from  'angular2/src/core/compiler/xhr/xhr_impl' ; 
1818import  { EventManager }  from  'angular2/src/core/events/event_manager' ; 
1919import  { HammerGesturesPlugin }  from  'angular2/src/core/events/hammer_gestures' ; 
20+ import  { Binding }  from  'angular2/src/di/binding' ; 
2021
2122var  _rootInjector : Injector ; 
2223
@@ -40,7 +41,7 @@ export var appElementToken = new OpaqueToken('AppElement');
4041export  var  appComponentAnnotatedTypeToken  =  new  OpaqueToken ( 'AppComponentAnnotatedType' ) ; 
4142export  var  appDocumentToken  =  new  OpaqueToken ( 'AppDocument' ) ; 
4243
43- function  _injectorBindings ( appComponentType )  { 
44+ function  _injectorBindings ( appComponentType ) :  List < Binding >  { 
4445 return  [ 
4546 bind ( appDocumentToken ) . toValue ( DOM . defaultDoc ( ) ) , 
4647 bind ( appComponentAnnotatedTypeToken ) . toFactory ( ( reader )  =>  { 
@@ -88,7 +89,7 @@ function _injectorBindings(appComponentType) {
8889 ] ; 
8990} 
9091
91- function  _createVmZone ( givenReporter :Function ) { 
92+ function  _createVmZone ( givenReporter :Function ) :  VmTurnZone   { 
9293 var  defaultErrorReporter  =  ( exception ,  stackTrace )  =>  { 
9394 var  longStackTrace  =  ListWrapper . join ( stackTrace ,  "\n\n-----async gap-----\n" ) ; 
9495 print ( `${ exception }  \n\n${ longStackTrace }  ` ) ; 
@@ -104,7 +105,7 @@ function _createVmZone(givenReporter:Function){
104105
105106// Multiple calls to this method are allowed. Each application would only share 
106107// _rootInjector, which is not user-configurable by design, thus safe to share. 
107- export  function  bootstrap ( appComponentType : Type ,  bindings = null ,  givenBootstrapErrorReporter = null )  { 
108+ export  function  bootstrap ( appComponentType : Type ,  bindings :  List < Binding > =null ,  givenBootstrapErrorReporter :  Function = null ) :  Promise  { 
108109 var  bootstrapProcess  =  PromiseWrapper . completer ( ) ; 
109110
110111 var  zone  =  _createVmZone ( givenBootstrapErrorReporter ) ; 
@@ -132,7 +133,7 @@ export function bootstrap(appComponentType: Type, bindings=null, givenBootstrapE
132133 return  bootstrapProcess . promise ; 
133134} 
134135
135- function  _createAppInjector ( appComponentType : Type ,  bindings : List ,  zone : VmTurnZone ) : Injector  { 
136+ function  _createAppInjector ( appComponentType : Type ,  bindings : List < Binding > ,  zone : VmTurnZone ) : Injector  { 
136137 if  ( isBlank ( _rootInjector ) )  _rootInjector  =  new  Injector ( _rootBindings ) ; 
137138 var  mergedBindings  =  isPresent ( bindings )  ?
138139 ListWrapper . concat ( _injectorBindings ( appComponentType ) ,  bindings )  :
0 commit comments