@@ -25,7 +25,7 @@ export function main() {
25
25
describe ( 'binding to CSS class list' , ( ) => {
26
26
27
27
it ( 'should clean up when the directive is destroyed' ,
28
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
28
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
29
29
var template = '<div *ngFor="let item of items" [ngClass]="item"></div>' ;
30
30
tcb . overrideTemplate ( TestComponent , template )
31
31
. createAsync ( TestComponent )
@@ -44,7 +44,7 @@ export function main() {
44
44
describe ( 'expressions evaluating to objects' , ( ) => {
45
45
46
46
it ( 'should add classes specified in an object literal' ,
47
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
47
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
48
48
var template = '<div [ngClass]="{foo: true, bar: false}"></div>' ;
49
49
50
50
tcb . overrideTemplate ( TestComponent , template )
@@ -57,7 +57,7 @@ export function main() {
57
57
58
58
59
59
it ( 'should add classes specified in an object literal without change in class names' ,
60
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
60
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
61
61
var template = `<div [ngClass]="{'foo-bar': true, 'fooBar': true}"></div>` ;
62
62
63
63
tcb . overrideTemplate ( TestComponent , template )
@@ -69,7 +69,7 @@ export function main() {
69
69
} ) ) ;
70
70
71
71
it ( 'should add and remove classes based on changes in object literal values' ,
72
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
72
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
73
73
var template = '<div [ngClass]="{foo: condition, bar: !condition}"></div>' ;
74
74
75
75
tcb . overrideTemplate ( TestComponent , template )
@@ -85,7 +85,7 @@ export function main() {
85
85
} ) ) ;
86
86
87
87
it ( 'should add and remove classes based on changes to the expression object' ,
88
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
88
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
89
89
var template = '<div [ngClass]="objExpr"></div>' ;
90
90
91
91
tcb . overrideTemplate ( TestComponent , template )
@@ -107,7 +107,7 @@ export function main() {
107
107
} ) ) ;
108
108
109
109
it ( 'should add and remove classes based on reference changes to the expression object' ,
110
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
110
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
111
111
var template = '<div [ngClass]="objExpr"></div>' ;
112
112
113
113
tcb . overrideTemplate ( TestComponent , template )
@@ -126,7 +126,7 @@ export function main() {
126
126
} ) ) ;
127
127
128
128
it ( 'should remove active classes when expression evaluates to null' ,
129
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
129
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
130
130
var template = '<div [ngClass]="objExpr"></div>' ;
131
131
132
132
tcb . overrideTemplate ( TestComponent , template )
@@ -146,7 +146,7 @@ export function main() {
146
146
147
147
148
148
it ( 'should allow multiple classes per expression' ,
149
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
149
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
150
150
var template = '<div [ngClass]="objExpr"></div>' ;
151
151
152
152
tcb . overrideTemplate ( TestComponent , template )
@@ -171,7 +171,7 @@ export function main() {
171
171
} ) ) ;
172
172
173
173
it ( 'should split by one or more spaces between classes' ,
174
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
174
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
175
175
var template = '<div [ngClass]="objExpr"></div>' ;
176
176
177
177
tcb . overrideTemplate ( TestComponent , template )
@@ -190,7 +190,7 @@ export function main() {
190
190
describe ( 'expressions evaluating to lists' , ( ) => {
191
191
192
192
it ( 'should add classes specified in a list literal' ,
193
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
193
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
194
194
var template = `<div [ngClass]="['foo', 'bar', 'foo-bar', 'fooBar']"></div>` ;
195
195
196
196
tcb . overrideTemplate ( TestComponent , template )
@@ -202,7 +202,7 @@ export function main() {
202
202
} ) ) ;
203
203
204
204
it ( 'should add and remove classes based on changes to the expression' ,
205
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
205
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
206
206
var template = '<div [ngClass]="arrExpr"></div>' ;
207
207
208
208
tcb . overrideTemplate ( TestComponent , template )
@@ -225,7 +225,7 @@ export function main() {
225
225
} ) ) ;
226
226
227
227
it ( 'should add and remove classes when a reference changes' ,
228
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
228
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
229
229
var template = '<div [ngClass]="arrExpr"></div>' ;
230
230
231
231
tcb . overrideTemplate ( TestComponent , template )
@@ -241,7 +241,7 @@ export function main() {
241
241
} ) ) ;
242
242
243
243
it ( 'should take initial classes into account when a reference changes' ,
244
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
244
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
245
245
var template = '<div class="foo" [ngClass]="arrExpr"></div>' ;
246
246
247
247
tcb . overrideTemplate ( TestComponent , template )
@@ -257,7 +257,7 @@ export function main() {
257
257
} ) ) ;
258
258
259
259
it ( 'should ignore empty or blank class names' ,
260
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
260
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
261
261
var template = '<div class="foo" [ngClass]="arrExpr"></div>' ;
262
262
263
263
tcb . overrideTemplate ( TestComponent , template )
@@ -272,7 +272,7 @@ export function main() {
272
272
} ) ) ;
273
273
274
274
it ( 'should trim blanks from class names' ,
275
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
275
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
276
276
var template = '<div class="foo" [ngClass]="arrExpr"></div>' ;
277
277
278
278
tcb . overrideTemplate ( TestComponent , template )
@@ -288,7 +288,7 @@ export function main() {
288
288
289
289
290
290
it ( 'should allow multiple classes per item in arrays' ,
291
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
291
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
292
292
var template = '<div [ngClass]="arrExpr"></div>' ;
293
293
294
294
tcb . overrideTemplate ( TestComponent , template )
@@ -310,7 +310,7 @@ export function main() {
310
310
describe ( 'expressions evaluating to sets' , ( ) => {
311
311
312
312
it ( 'should add and remove classes if the set instance changed' ,
313
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
313
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
314
314
var template = '<div [ngClass]="setExpr"></div>' ;
315
315
316
316
tcb . overrideTemplate ( TestComponent , template )
@@ -333,7 +333,7 @@ export function main() {
333
333
describe ( 'expressions evaluating to string' , ( ) => {
334
334
335
335
it ( 'should add classes specified in a string literal' ,
336
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
336
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
337
337
var template = `<div [ngClass]="'foo bar foo-bar fooBar'"></div>` ;
338
338
339
339
tcb . overrideTemplate ( TestComponent , template )
@@ -345,7 +345,7 @@ export function main() {
345
345
} ) ) ;
346
346
347
347
it ( 'should add and remove classes based on changes to the expression' ,
348
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
348
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
349
349
var template = '<div [ngClass]="strExpr"></div>' ;
350
350
351
351
tcb . overrideTemplate ( TestComponent , template )
@@ -365,7 +365,7 @@ export function main() {
365
365
} ) ) ;
366
366
367
367
it ( 'should remove active classes when switching from string to null' ,
368
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
368
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
369
369
var template = `<div [ngClass]="strExpr"></div>` ;
370
370
371
371
tcb . overrideTemplate ( TestComponent , template )
@@ -381,7 +381,7 @@ export function main() {
381
381
} ) ) ;
382
382
383
383
it ( 'should take initial classes into account when switching from string to null' ,
384
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
384
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
385
385
var template = `<div class="foo" [ngClass]="strExpr"></div>` ;
386
386
387
387
tcb . overrideTemplate ( TestComponent , template )
@@ -397,7 +397,7 @@ export function main() {
397
397
} ) ) ;
398
398
399
399
it ( 'should ignore empty and blank strings' ,
400
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
400
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
401
401
var template = `<div class="foo" [ngClass]="strExpr"></div>` ;
402
402
403
403
tcb . overrideTemplate ( TestComponent , template )
@@ -415,7 +415,7 @@ export function main() {
415
415
describe ( 'cooperation with other class-changing constructs' , ( ) => {
416
416
417
417
it ( 'should co-operate with the class attribute' ,
418
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
418
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
419
419
var template = '<div [ngClass]="objExpr" class="init foo"></div>' ;
420
420
421
421
tcb . overrideTemplate ( TestComponent , template )
@@ -435,7 +435,7 @@ export function main() {
435
435
} ) ) ;
436
436
437
437
it ( 'should co-operate with the interpolated class attribute' ,
438
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
438
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
439
439
var template = `<div [ngClass]="objExpr" class="{{'init foo'}}"></div>` ;
440
440
441
441
tcb . overrideTemplate ( TestComponent , template )
@@ -455,7 +455,7 @@ export function main() {
455
455
} ) ) ;
456
456
457
457
it ( 'should co-operate with the class attribute and binding to it' ,
458
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
458
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
459
459
var template = `<div [ngClass]="objExpr" class="init" [class]="'foo'"></div>` ;
460
460
461
461
tcb . overrideTemplate ( TestComponent , template )
@@ -475,7 +475,7 @@ export function main() {
475
475
} ) ) ;
476
476
477
477
it ( 'should co-operate with the class attribute and class.name binding' ,
478
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
478
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
479
479
var template =
480
480
'<div class="init foo" [ngClass]="objExpr" [class.baz]="condition"></div>' ;
481
481
@@ -498,7 +498,7 @@ export function main() {
498
498
} ) ) ;
499
499
500
500
it ( 'should co-operate with initial class and class attribute binding when binding changes' ,
501
- inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async ) => {
501
+ inject ( [ TestComponentBuilder , AsyncTestCompleter ] , ( tcb : TestComponentBuilder , async : any /** TODO #9100 */ ) => {
502
502
var template = '<div class="init" [ngClass]="objExpr" [class]="strExpr"></div>' ;
503
503
504
504
tcb . overrideTemplate ( TestComponent , template )
0 commit comments