@@ -110,7 +110,7 @@ export function main() {
110110 function _bindSimpleValue ( expression : string , context = _DEFAULT_CONTEXT ) {
111111 var val = _createChangeDetector ( expression , context ) ;
112112 val . changeDetector . detectChanges ( ) ;
113- return val . dispatcher . log ;
113+ return ( < TestDispatcher > val . dispatcher ) . log ;
114114 }
115115
116116 describe ( 'short-circuit' , ( ) => {
@@ -316,64 +316,64 @@ export function main() {
316316 var val = _createChangeDetector ( 'age' , person ) ;
317317
318318 val . changeDetector . detectChanges ( ) ;
319- expect ( val . dispatcher . log ) . toEqual ( [ 'propName=NaN' ] ) ;
319+ expect ( ( < TestDispatcher > val . dispatcher ) . log ) . toEqual ( [ 'propName=NaN' ] ) ;
320320 val . dispatcher . clear ( ) ;
321321
322322 val . changeDetector . detectChanges ( ) ;
323- expect ( val . dispatcher . log ) . toEqual ( [ ] ) ;
323+ expect ( ( < TestDispatcher > val . dispatcher ) . log ) . toEqual ( [ ] ) ;
324324 } ) ;
325325
326326 it ( 'should do simple watching' , ( ) => {
327327 var person = new Person ( 'misko' ) ;
328328 var val = _createChangeDetector ( 'name' , person ) ;
329329
330330 val . changeDetector . detectChanges ( ) ;
331- expect ( val . dispatcher . log ) . toEqual ( [ 'propName=misko' ] ) ;
331+ expect ( ( < TestDispatcher > val . dispatcher ) . log ) . toEqual ( [ 'propName=misko' ] ) ;
332332 val . dispatcher . clear ( ) ;
333333
334334 val . changeDetector . detectChanges ( ) ;
335- expect ( val . dispatcher . log ) . toEqual ( [ ] ) ;
335+ expect ( ( < TestDispatcher > val . dispatcher ) . log ) . toEqual ( [ ] ) ;
336336 val . dispatcher . clear ( ) ;
337337
338338 person . name = 'Misko' ;
339339 val . changeDetector . detectChanges ( ) ;
340- expect ( val . dispatcher . log ) . toEqual ( [ 'propName=Misko' ] ) ;
340+ expect ( ( < TestDispatcher > val . dispatcher ) . log ) . toEqual ( [ 'propName=Misko' ] ) ;
341341 } ) ;
342342
343343 it ( 'should support literal array' , ( ) => {
344344 var val = _createChangeDetector ( '[1, 2]' ) ;
345345 val . changeDetector . detectChanges ( ) ;
346- expect ( val . dispatcher . loggedValues ) . toEqual ( [ [ 1 , 2 ] ] ) ;
346+ expect ( ( < TestDispatcher > val . dispatcher ) . loggedValues ) . toEqual ( [ [ 1 , 2 ] ] ) ;
347347
348348 val = _createChangeDetector ( '[1, a]' , new TestData ( 2 ) ) ;
349349 val . changeDetector . detectChanges ( ) ;
350- expect ( val . dispatcher . loggedValues ) . toEqual ( [ [ 1 , 2 ] ] ) ;
350+ expect ( ( < TestDispatcher > val . dispatcher ) . loggedValues ) . toEqual ( [ [ 1 , 2 ] ] ) ;
351351 } ) ;
352352
353353 it ( 'should support literal maps' , ( ) => {
354354 var val = _createChangeDetector ( '{z: 1}' ) ;
355355 val . changeDetector . detectChanges ( ) ;
356- expect ( val . dispatcher . loggedValues [ 0 ] [ 'z' ] ) . toEqual ( 1 ) ;
356+ expect ( ( < TestDispatcher > val . dispatcher ) . loggedValues [ 0 ] [ 'z' ] ) . toEqual ( 1 ) ;
357357
358358 val = _createChangeDetector ( '{z: a}' , new TestData ( 1 ) ) ;
359359 val . changeDetector . detectChanges ( ) ;
360- expect ( val . dispatcher . loggedValues [ 0 ] [ 'z' ] ) . toEqual ( 1 ) ;
360+ expect ( ( < TestDispatcher > val . dispatcher ) . loggedValues [ 0 ] [ 'z' ] ) . toEqual ( 1 ) ;
361361 } ) ;
362362
363363 it ( 'should support interpolation' , ( ) => {
364364 var val = _createChangeDetector ( 'interpolation' , new TestData ( 'value' ) ) ;
365365
366366 val . changeDetector . detectChanges ( ) ;
367367
368- expect ( val . dispatcher . log ) . toEqual ( [ 'propName=BvalueA' ] ) ;
368+ expect ( ( < TestDispatcher > val . dispatcher ) . log ) . toEqual ( [ 'propName=BvalueA' ] ) ;
369369 } ) ;
370370
371371 it ( 'should output empty strings for null values in interpolation' , ( ) => {
372372 var val = _createChangeDetector ( 'interpolation' , new TestData ( null ) ) ;
373373
374374 val . changeDetector . detectChanges ( ) ;
375375
376- expect ( val . dispatcher . log ) . toEqual ( [ 'propName=BA' ] ) ;
376+ expect ( ( < TestDispatcher > val . dispatcher ) . log ) . toEqual ( [ 'propName=BA' ] ) ;
377377 } ) ;
378378
379379 it ( 'should escape values in literals that indicate interpolation' ,
@@ -385,7 +385,7 @@ export function main() {
385385 var val = _createChangeDetector ( 'passThrough([12])' , person ) ;
386386 val . changeDetector . detectChanges ( ) ;
387387 val . changeDetector . detectChanges ( ) ;
388- expect ( val . dispatcher . loggedValues ) . toEqual ( [ [ 12 ] ] ) ;
388+ expect ( ( < TestDispatcher > val . dispatcher ) . loggedValues ) . toEqual ( [ [ 12 ] ] ) ;
389389 } ) ;
390390 } ) ;
391391
@@ -395,7 +395,7 @@ export function main() {
395395 var person = new Person ( 'bob' ) ;
396396 var val = _createChangeDetector ( 'name' , person ) ;
397397 val . changeDetector . detectChanges ( ) ;
398- expect ( val . dispatcher . loggedValues ) . toEqual ( [ 'bob' ] ) ;
398+ expect ( ( < TestDispatcher > val . dispatcher ) . loggedValues ) . toEqual ( [ 'bob' ] ) ;
399399 } ) ;
400400 } ) ;
401401
@@ -405,7 +405,7 @@ export function main() {
405405 var person = new Person ( 'bob' ) ;
406406 var val = _createChangeDetector ( 'name | pipe' , person , registry ) ;
407407 val . changeDetector . detectChanges ( ) ;
408- expect ( val . dispatcher . loggedValues ) . toEqual ( [ 'bob state:0' ] ) ;
408+ expect ( ( < TestDispatcher > val . dispatcher ) . loggedValues ) . toEqual ( [ 'bob state:0' ] ) ;
409409 } ) ;
410410
411411 it ( 'should support arguments in pipes' , ( ) => {
@@ -414,15 +414,17 @@ export function main() {
414414 var person = new Person ( 'value' , address ) ;
415415 var val = _createChangeDetector ( "name | pipe:'one':address.city" , person , registry ) ;
416416 val . changeDetector . detectChanges ( ) ;
417- expect ( val . dispatcher . loggedValues ) . toEqual ( [ 'value one two default' ] ) ;
417+ expect ( ( < TestDispatcher > val . dispatcher ) . loggedValues )
418+ . toEqual ( [ 'value one two default' ] ) ;
418419 } ) ;
419420
420421 it ( 'should associate pipes right-to-left' , ( ) => {
421422 var registry = new FakePipes ( 'pipe' , ( ) => new MultiArgPipe ( ) ) ;
422423 var person = new Person ( 'value' ) ;
423424 var val = _createChangeDetector ( "name | pipe:'a':'b' | pipe:0:1:2" , person , registry ) ;
424425 val . changeDetector . detectChanges ( ) ;
425- expect ( val . dispatcher . loggedValues ) . toEqual ( [ 'value a b default 0 1 2' ] ) ;
426+ expect ( ( < TestDispatcher > val . dispatcher ) . loggedValues )
427+ . toEqual ( [ 'value a b default 0 1 2' ] ) ;
426428 } ) ;
427429
428430 it ( 'should not reevaluate pure pipes unless its context or arg changes' , ( ) => {
@@ -460,7 +462,7 @@ export function main() {
460462 var person = new Person ( 'bob' ) ;
461463 var val = _createChangeDetector ( '(name | pipe).length' , person , registry ) ;
462464 val . changeDetector . detectChanges ( ) ;
463- expect ( val . dispatcher . loggedValues ) . toEqual ( [ 3 ] ) ;
465+ expect ( ( < TestDispatcher > val . dispatcher ) . loggedValues ) . toEqual ( [ 3 ] ) ;
464466 } ) ;
465467 } ) ;
466468
@@ -492,7 +494,7 @@ export function main() {
492494 val . changeDetector . hydrate ( _DEFAULT_CONTEXT , null , new TestDispatcher ( [ directive1 ] , [ ] ) ,
493495 null ) ;
494496 val . changeDetector . detectChanges ( ) ;
495- expect ( val . dispatcher . loggedValues ) . toEqual ( [ ] ) ;
497+ expect ( ( < TestDispatcher > val . dispatcher ) . loggedValues ) . toEqual ( [ ] ) ;
496498 expect ( directive1 . a ) . toEqual ( 42 ) ;
497499 } ) ;
498500
@@ -874,7 +876,7 @@ export function main() {
874876
875877 val . changeDetector . detectChanges ( ) ;
876878
877- expect ( val . dispatcher . loggedValues ) . toEqual ( [ 'aaa' ] ) ;
879+ expect ( ( < TestDispatcher > val . dispatcher ) . loggedValues ) . toEqual ( [ 'aaa' ] ) ;
878880 } ) ;
879881 } ) ;
880882
@@ -900,7 +902,7 @@ export function main() {
900902 'Expression [\'"]a in location[\'"] has changed after it was checked.' ) ) ;
901903
902904 val . changeDetector . detectChanges ( ) ;
903- expect ( val . dispatcher . loggedValues ) . toEqual ( [ 'value' ] ) ;
905+ expect ( ( < TestDispatcher > val . dispatcher ) . loggedValues ) . toEqual ( [ 'value' ] ) ;
904906 } ) ;
905907 } ) ;
906908
@@ -1021,7 +1023,7 @@ export function main() {
10211023 val . changeDetector . mode = ChangeDetectionStrategy . Detached ;
10221024 val . changeDetector . detectChanges ( ) ;
10231025
1024- expect ( val . dispatcher . log ) . toEqual ( [ ] ) ;
1026+ expect ( ( < TestDispatcher > val . dispatcher ) . log ) . toEqual ( [ ] ) ;
10251027 } ) ;
10261028
10271029 it ( 'should not check a checked change detector' , ( ) => {
@@ -1031,7 +1033,7 @@ export function main() {
10311033 val . changeDetector . mode = ChangeDetectionStrategy . Checked ;
10321034 val . changeDetector . detectChanges ( ) ;
10331035
1034- expect ( val . dispatcher . log ) . toEqual ( [ ] ) ;
1036+ expect ( ( < TestDispatcher > val . dispatcher ) . log ) . toEqual ( [ ] ) ;
10351037 } ) ;
10361038
10371039 it ( 'should change CheckOnce to Checked' , ( ) => {
@@ -1173,12 +1175,12 @@ export function main() {
11731175 var val = _createChangeDetector ( 'name' , context ) ;
11741176
11751177 val . changeDetector . detectChanges ( ) ;
1176- expect ( val . dispatcher . log ) . toEqual ( [ 'propName=Bob' ] ) ;
1178+ expect ( ( < TestDispatcher > val . dispatcher ) . log ) . toEqual ( [ 'propName=Bob' ] ) ;
11771179
11781180 val . changeDetector . dehydrate ( ) ;
11791181 expect ( ( ) => { val . changeDetector . detectChanges ( ) } )
11801182 . toThrowErrorWith ( "Attempt to use a dehydrated detector" ) ;
1181- expect ( val . dispatcher . log ) . toEqual ( [ 'propName=Bob' ] ) ;
1183+ expect ( ( < TestDispatcher > val . dispatcher ) . log ) . toEqual ( [ 'propName=Bob' ] ) ;
11821184 } ) ;
11831185 } ) ;
11841186
@@ -1190,12 +1192,12 @@ export function main() {
11901192
11911193 val . changeDetector . detectChanges ( ) ;
11921194
1193- expect ( val . dispatcher . log ) . toEqual ( [ 'propName=Megatron' ] ) ;
1195+ expect ( ( < TestDispatcher > val . dispatcher ) . log ) . toEqual ( [ 'propName=Megatron' ] ) ;
11941196
11951197 val . dispatcher . clear ( ) ;
11961198 val . changeDetector . detectChanges ( ) ;
11971199
1198- expect ( val . dispatcher . log ) . toEqual ( [ ] ) ;
1200+ expect ( ( < TestDispatcher > val . dispatcher ) . log ) . toEqual ( [ ] ) ;
11991201 } ) ;
12001202
12011203 it ( 'should unwrap the wrapped value' , ( ) => {
@@ -1206,7 +1208,7 @@ export function main() {
12061208
12071209 val . changeDetector . detectChanges ( ) ;
12081210
1209- expect ( val . dispatcher . log ) . toEqual ( [ 'propName=Megatron' ] ) ;
1211+ expect ( ( < TestDispatcher > val . dispatcher ) . log ) . toEqual ( [ 'propName=Megatron' ] ) ;
12101212 } ) ;
12111213
12121214 describe ( 'handleEvent' , ( ) => {
0 commit comments