refactor(TypeScript): Add noImplicitAny
We automatically insert explicit 'any's where needed. These need to be addressed as in #9100. Fixes #4924
This commit is contained in:
@ -7,12 +7,12 @@ import {FileReader, Uint8ArrayWrapper} from './file_api';
|
||||
|
||||
@Component({selector: 'image-demo', viewProviders: [BitmapService], templateUrl: 'image_demo.html'})
|
||||
export class ImageDemo {
|
||||
images = [];
|
||||
images: any[] /** TODO #9100 */ = [];
|
||||
fileInput: String;
|
||||
|
||||
constructor(private _bitmapService: BitmapService) {}
|
||||
|
||||
uploadFiles(files) {
|
||||
uploadFiles(files: any /** TODO #9100 */) {
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
var reader = new FileReader();
|
||||
reader.addEventListener("load", this.handleReaderLoad(reader));
|
||||
|
@ -1,6 +1,6 @@
|
||||
/// <reference path="../bitmap.d.ts" /> /// <reference path="../b64.d.ts" />
|
||||
import {Injectable} from '@angular/core';
|
||||
declare var base64js;
|
||||
declare var base64js: any /** TODO #9100 */;
|
||||
|
||||
// Temporary fix for Typescript issue #4220 (https://github.com/Microsoft/TypeScript/issues/4220)
|
||||
// var _ImageData: (width: number, height: number) => void = <any>postMessage;
|
||||
@ -151,7 +151,7 @@ export class BitmapService {
|
||||
// Based on example from
|
||||
// http://www.worldwidewhat.net/2012/07/how-to-draw-bitmaps-using-javascript/
|
||||
private _getLittleEndianHex(value: number): string {
|
||||
var result = [];
|
||||
var result: any[] /** TODO #9100 */ = [];
|
||||
|
||||
for (var bytes = 4; bytes > 0; bytes--) {
|
||||
result.push(String.fromCharCode(value & 255));
|
||||
|
@ -18,7 +18,7 @@ export class InputCmp {
|
||||
inputVal = "";
|
||||
textareaVal = "";
|
||||
|
||||
inputChanged(e) { this.inputVal = e.target.value; }
|
||||
inputChanged(e: any /** TODO #9100 */) { this.inputVal = e.target.value; }
|
||||
|
||||
textAreaChanged(e) { this.textareaVal = e.target.value; }
|
||||
textAreaChanged(e: any /** TODO #9100 */) { this.textareaVal = e.target.value; }
|
||||
}
|
||||
|
@ -52,5 +52,5 @@ export class HelloCmp {
|
||||
|
||||
changeGreeting(): void { this.greeting = 'howdy'; }
|
||||
|
||||
onKeyDown(event): void { this.lastKey = StringWrapper.fromCharCode(event.keyCode); }
|
||||
onKeyDown(event: any /** TODO #9100 */): void { this.lastKey = StringWrapper.fromCharCode(event.keyCode); }
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ export class TodoApp {
|
||||
this.inputValue = "";
|
||||
}
|
||||
|
||||
doneEditing($event, todo: Todo): void {
|
||||
doneEditing($event: any /** TODO #9100 */, todo: Todo): void {
|
||||
var which = $event.keyCode;
|
||||
if (which === 13) {
|
||||
todo.title = todo.editTitle;
|
||||
@ -56,7 +56,7 @@ export class TodoApp {
|
||||
|
||||
deleteMe(todo: Todo): void { this.todoStore.remove(todo); }
|
||||
|
||||
toggleAll($event): void {
|
||||
toggleAll($event: any /** TODO #9100 */): void {
|
||||
this.isComplete = !this.isComplete;
|
||||
this.todoStore.list.forEach((todo: Todo) => { todo.completed = this.isComplete; });
|
||||
}
|
||||
|
Reference in New Issue
Block a user