chore: noImplicitAny fixes

This commit is contained in:
Misko Hevery
2016-02-11 17:01:17 -08:00
committed by vsavkin
parent cfc1e56dd8
commit 8bb66a5eb3
38 changed files with 219 additions and 147 deletions

View File

@ -1,6 +1,6 @@
import {Component, Attribute, Directive, Pipe} from 'angular2/core';
var CustomDirective;
var CustomDirective: Function;
// #docregion component
@Component({selector: 'greet', template: 'Hello {{name}}!', directives: [CustomDirective]})
@ -20,7 +20,7 @@ class Page {
// #docregion attributeMetadata
@Directive({selector: 'input'})
class InputAttrDirective {
constructor(@Attribute('type') type) {
constructor(@Attribute('type') type: string) {
// type would be 'text' in this example
}
}
@ -38,6 +38,6 @@ class InputDirective {
// #docregion pipe
@Pipe({name: 'lowercase'})
class Lowercase {
transform(v, args) { return v.toLowerCase(); }
transform(v: string, args: any[]) { return v.toLowerCase(); }
}
// #enddocregion

View File

@ -1,7 +1,7 @@
// #docregion enableProdMode
import {enableProdMode} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {MyComponent} from 'my_component';
import {MyComponent} from './my_component';
enableProdMode();
bootstrap(MyComponent);