Skip to content

Commit 86fbd50

Browse files
committed
refactor(TypeScript): Add noImplicitAny
We automatically insert explicit 'any's where needed. These need to be addressed as in angular#9100. Fixes angular#4924
1 parent 87d824e commit 86fbd50

File tree

305 files changed

+2338
-2337
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

305 files changed

+2338
-2337
lines changed

modules/@angular/common/src/directives/ng_for.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export class NgFor implements DoCheck {
144144
viewRef.context.count = ilen;
145145
}
146146

147-
changes.forEachIdentityChange((record) => {
147+
changes.forEachIdentityChange((record: any /** TODO #9100 */) => {
148148
var viewRef = <EmbeddedViewRef<NgForRow>>this._viewContainer.get(record.currentIndex);
149149
viewRef.context.$implicit = record.item;
150150
});

modules/@angular/common/test/directives/ng_class_spec.ts

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function main() {
2525
describe('binding to CSS class list', () => {
2626

2727
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 */) => {
2929
var template = '<div *ngFor="let item of items" [ngClass]="item"></div>';
3030
tcb.overrideTemplate(TestComponent, template)
3131
.createAsync(TestComponent)
@@ -44,7 +44,7 @@ export function main() {
4444
describe('expressions evaluating to objects', () => {
4545

4646
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 */) => {
4848
var template = '<div [ngClass]="{foo: true, bar: false}"></div>';
4949

5050
tcb.overrideTemplate(TestComponent, template)
@@ -57,7 +57,7 @@ export function main() {
5757

5858

5959
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 */) => {
6161
var template = `<div [ngClass]="{'foo-bar': true, 'fooBar': true}"></div>`;
6262

6363
tcb.overrideTemplate(TestComponent, template)
@@ -69,7 +69,7 @@ export function main() {
6969
}));
7070

7171
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 */) => {
7373
var template = '<div [ngClass]="{foo: condition, bar: !condition}"></div>';
7474

7575
tcb.overrideTemplate(TestComponent, template)
@@ -85,7 +85,7 @@ export function main() {
8585
}));
8686

8787
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 */) => {
8989
var template = '<div [ngClass]="objExpr"></div>';
9090

9191
tcb.overrideTemplate(TestComponent, template)
@@ -107,7 +107,7 @@ export function main() {
107107
}));
108108

109109
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 */) => {
111111
var template = '<div [ngClass]="objExpr"></div>';
112112

113113
tcb.overrideTemplate(TestComponent, template)
@@ -126,7 +126,7 @@ export function main() {
126126
}));
127127

128128
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 */) => {
130130
var template = '<div [ngClass]="objExpr"></div>';
131131

132132
tcb.overrideTemplate(TestComponent, template)
@@ -146,7 +146,7 @@ export function main() {
146146

147147

148148
it('should allow multiple classes per expression',
149-
inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, async) => {
149+
inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, async: any /** TODO #9100 */) => {
150150
var template = '<div [ngClass]="objExpr"></div>';
151151

152152
tcb.overrideTemplate(TestComponent, template)
@@ -171,7 +171,7 @@ export function main() {
171171
}));
172172

173173
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 */) => {
175175
var template = '<div [ngClass]="objExpr"></div>';
176176

177177
tcb.overrideTemplate(TestComponent, template)
@@ -190,7 +190,7 @@ export function main() {
190190
describe('expressions evaluating to lists', () => {
191191

192192
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 */) => {
194194
var template = `<div [ngClass]="['foo', 'bar', 'foo-bar', 'fooBar']"></div>`;
195195

196196
tcb.overrideTemplate(TestComponent, template)
@@ -202,7 +202,7 @@ export function main() {
202202
}));
203203

204204
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 */) => {
206206
var template = '<div [ngClass]="arrExpr"></div>';
207207

208208
tcb.overrideTemplate(TestComponent, template)
@@ -225,7 +225,7 @@ export function main() {
225225
}));
226226

227227
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 */) => {
229229
var template = '<div [ngClass]="arrExpr"></div>';
230230

231231
tcb.overrideTemplate(TestComponent, template)
@@ -241,7 +241,7 @@ export function main() {
241241
}));
242242

243243
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 */) => {
245245
var template = '<div class="foo" [ngClass]="arrExpr"></div>';
246246

247247
tcb.overrideTemplate(TestComponent, template)
@@ -257,7 +257,7 @@ export function main() {
257257
}));
258258

259259
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 */) => {
261261
var template = '<div class="foo" [ngClass]="arrExpr"></div>';
262262

263263
tcb.overrideTemplate(TestComponent, template)
@@ -272,7 +272,7 @@ export function main() {
272272
}));
273273

274274
it('should trim blanks from class names',
275-
inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, async) => {
275+
inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, async: any /** TODO #9100 */) => {
276276
var template = '<div class="foo" [ngClass]="arrExpr"></div>';
277277

278278
tcb.overrideTemplate(TestComponent, template)
@@ -288,7 +288,7 @@ export function main() {
288288

289289

290290
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 */) => {
292292
var template = '<div [ngClass]="arrExpr"></div>';
293293

294294
tcb.overrideTemplate(TestComponent, template)
@@ -310,7 +310,7 @@ export function main() {
310310
describe('expressions evaluating to sets', () => {
311311

312312
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 */) => {
314314
var template = '<div [ngClass]="setExpr"></div>';
315315

316316
tcb.overrideTemplate(TestComponent, template)
@@ -333,7 +333,7 @@ export function main() {
333333
describe('expressions evaluating to string', () => {
334334

335335
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 */) => {
337337
var template = `<div [ngClass]="'foo bar foo-bar fooBar'"></div>`;
338338

339339
tcb.overrideTemplate(TestComponent, template)
@@ -345,7 +345,7 @@ export function main() {
345345
}));
346346

347347
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 */) => {
349349
var template = '<div [ngClass]="strExpr"></div>';
350350

351351
tcb.overrideTemplate(TestComponent, template)
@@ -365,7 +365,7 @@ export function main() {
365365
}));
366366

367367
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 */) => {
369369
var template = `<div [ngClass]="strExpr"></div>`;
370370

371371
tcb.overrideTemplate(TestComponent, template)
@@ -381,7 +381,7 @@ export function main() {
381381
}));
382382

383383
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 */) => {
385385
var template = `<div class="foo" [ngClass]="strExpr"></div>`;
386386

387387
tcb.overrideTemplate(TestComponent, template)
@@ -397,7 +397,7 @@ export function main() {
397397
}));
398398

399399
it('should ignore empty and blank strings',
400-
inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, async) => {
400+
inject([TestComponentBuilder, AsyncTestCompleter], (tcb: TestComponentBuilder, async: any /** TODO #9100 */) => {
401401
var template = `<div class="foo" [ngClass]="strExpr"></div>`;
402402

403403
tcb.overrideTemplate(TestComponent, template)
@@ -415,7 +415,7 @@ export function main() {
415415
describe('cooperation with other class-changing constructs', () => {
416416

417417
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 */) => {
419419
var template = '<div [ngClass]="objExpr" class="init foo"></div>';
420420

421421
tcb.overrideTemplate(TestComponent, template)
@@ -435,7 +435,7 @@ export function main() {
435435
}));
436436

437437
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 */) => {
439439
var template = `<div [ngClass]="objExpr" class="{{'init foo'}}"></div>`;
440440

441441
tcb.overrideTemplate(TestComponent, template)
@@ -455,7 +455,7 @@ export function main() {
455455
}));
456456

457457
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 */) => {
459459
var template = `<div [ngClass]="objExpr" class="init" [class]="'foo'"></div>`;
460460

461461
tcb.overrideTemplate(TestComponent, template)
@@ -475,7 +475,7 @@ export function main() {
475475
}));
476476

477477
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 */) => {
479479
var template =
480480
'<div class="init foo" [ngClass]="objExpr" [class.baz]="condition"></div>';
481481

@@ -498,7 +498,7 @@ export function main() {
498498
}));
499499

500500
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 */) => {
502502
var template = '<div class="init" [ngClass]="objExpr" [class]="strExpr"></div>';
503503

504504
tcb.overrideTemplate(TestComponent, template)

0 commit comments

Comments
 (0)