@@ -75,7 +75,7 @@ export class AppView {
7575 this . componentChildViews = componentChildViews ;
7676 }
7777
78- getOrCreateViewContainer ( boundElementIndex :number ) {
78+ getOrCreateViewContainer ( boundElementIndex :number ) : ViewContainer {
7979 var viewContainer = this . viewContainers [ boundElementIndex ] ;
8080 if ( isBlank ( viewContainer ) ) {
8181 viewContainer = new ViewContainer ( this , this . proto . elementBinders [ boundElementIndex ] . nestedProtoView , this . elementInjectors [ boundElementIndex ] ) ;
@@ -84,7 +84,7 @@ export class AppView {
8484 return viewContainer ;
8585 }
8686
87- setLocal ( contextName : string , value ) {
87+ setLocal ( contextName : string , value ) : void {
8888 if ( ! this . hydrated ( ) ) throw new BaseException ( 'Cannot set locals on dehydrated view.' ) ;
8989 if ( ! MapWrapper . contains ( this . proto . variableBindings , contextName ) ) {
9090 return ;
@@ -93,7 +93,7 @@ export class AppView {
9393 this . locals . set ( templateName , value ) ;
9494 }
9595
96- hydrated ( ) {
96+ hydrated ( ) : boolean {
9797 return isPresent ( this . context ) ;
9898 }
9999
@@ -106,14 +106,14 @@ export class AppView {
106106 * @param {* } eventObj
107107 * @param {int } binderIndex
108108 */
109- triggerEventHandlers ( eventName : string , eventObj , binderIndex : int ) {
109+ triggerEventHandlers ( eventName : string , eventObj , binderIndex : int ) : void {
110110 var locals = MapWrapper . create ( ) ;
111111 MapWrapper . set ( locals , '$event' , eventObj ) ;
112112 this . dispatchEvent ( binderIndex , eventName , locals ) ;
113113 }
114114
115115 // dispatch to element injector or text nodes based on context
116- notifyOnBinding ( b :BindingRecord , currentValue :any ) {
116+ notifyOnBinding ( b :BindingRecord , currentValue :any ) : void {
117117 if ( b . isElement ( ) ) {
118118 this . renderer . setElementProperty (
119119 this . render , b . elementIndex , b . propertyName , currentValue
@@ -199,7 +199,7 @@ export class AppProtoView {
199199 //TODO: Tobias or Victor. Moving it into the constructor.
200200 // this work should be done the constructor of AppProtoView once we separate
201201 // AppProtoView and ProtoViewBuilder
202- getVariableBindings ( ) {
202+ getVariableBindings ( ) : List {
203203 if ( isPresent ( this . _variableBindings ) ) {
204204 return this . _variableBindings ;
205205 }
@@ -217,7 +217,7 @@ export class AppProtoView {
217217 //TODO: Tobias or Victor. Moving it into the constructor.
218218 // this work should be done the constructor of ProtoView once we separate
219219 // AppProtoView and ProtoViewBuilder
220- getdirectiveRecords ( ) {
220+ getdirectiveRecords ( ) : List {
221221 if ( isPresent ( this . _directiveRecords ) ) {
222222 return this . _directiveRecords ;
223223 }
@@ -236,7 +236,7 @@ export class AppProtoView {
236236 return this . _directiveRecords ;
237237 }
238238
239- bindVariable ( contextName :string , templateName :string ) {
239+ bindVariable ( contextName :string , templateName :string ) : void {
240240 MapWrapper . set ( this . variableBindings , contextName , templateName ) ;
241241 MapWrapper . set ( this . protoLocals , templateName , null ) ;
242242 }
@@ -252,7 +252,7 @@ export class AppProtoView {
252252 /**
253253 * Adds a text node binding for the last created ElementBinder via bindElement
254254 */
255- bindTextNode ( expression :AST ) {
255+ bindTextNode ( expression :AST ) : void {
256256 var textNodeIndex = this . textNodesWithBindingCount ++ ;
257257 var b = BindingRecord . createForTextNode ( expression , textNodeIndex ) ;
258258 ListWrapper . push ( this . bindings , b ) ;
@@ -261,7 +261,7 @@ export class AppProtoView {
261261 /**
262262 * Adds an element property binding for the last created ElementBinder via bindElement
263263 */
264- bindElementProperty ( expression :AST , setterName :string ) {
264+ bindElementProperty ( expression :AST , setterName :string ) : void {
265265 var elementIndex = this . elementBinders . length - 1 ;
266266 var b = BindingRecord . createForElement ( expression , elementIndex , setterName ) ;
267267 ListWrapper . push ( this . bindings , b ) ;
@@ -280,7 +280,7 @@ export class AppProtoView {
280280 * @param {int } directiveIndex The directive index in the binder or -1 when the event is not bound
281281 * to a directive
282282 */
283- bindEvent ( eventBindings : List < renderApi . EventBinding > , directiveIndex : int = - 1 ) {
283+ bindEvent ( eventBindings : List < renderApi . EventBinding > , directiveIndex : int = - 1 ) : void {
284284 var elBinder = this . elementBinders [ this . elementBinders . length - 1 ] ;
285285 var events = elBinder . hostListeners ;
286286 if ( isBlank ( events ) ) {
@@ -306,15 +306,15 @@ export class AppProtoView {
306306 directiveIndex :number ,
307307 expression :AST ,
308308 setterName :string ,
309- setter :SetterFn ) {
309+ setter :SetterFn ) : void {
310310
311311 var elementIndex = this . elementBinders . length - 1 ;
312312 var directiveRecord = this . _getDirectiveRecord ( elementIndex , directiveIndex ) ;
313313 var b = BindingRecord . createForDirective ( expression , setterName , setter , directiveRecord ) ;
314314 ListWrapper . push ( this . bindings , b ) ;
315315 }
316316
317- _getDirectiveRecord ( elementInjectorIndex :number , directiveIndex :number ) {
317+ _getDirectiveRecord ( elementInjectorIndex :number , directiveIndex :number ) : DirectiveRecord {
318318 var id = elementInjectorIndex * 100 + directiveIndex ;
319319 var protoElementInjector = this . elementBinders [ elementInjectorIndex ] . protoElementInjector ;
320320
0 commit comments