chore: update blueprints considering noImplicityAny

This commit is contained in:
Ciro Nunes 2015-12-15 13:25:20 -02:00 committed by Filipe Silva
parent 5dcdf51182
commit 489d2bacf0
2 changed files with 3 additions and 3 deletions

View File

@ -4,12 +4,12 @@ import {<%= jsComponentName %>App} from '../app/<%= htmlComponentName %>';
beforeEachProviders(() => [<%= jsComponentName %>App]);
describe('App: <%= jsComponentName %>', () => {
it('should have the `defaultMeaning` as 42', inject([<%= jsComponentName %>App], (app) => {
it('should have the `defaultMeaning` as 42', inject([<%= jsComponentName %>App], (app: <%= jsComponentName %>App) => {
expect(app.defaultMeaning).toBe(42);
}));
describe('#meaningOfLife', () => {
it('should get the meaning of life', inject([<%= jsComponentName %>App], (app) => {
it('should get the meaning of life', inject([<%= jsComponentName %>App], (app: <%= jsComponentName %>App) => {
expect(app.meaningOfLife()).toBe('The meaning of life is 42');
expect(app.meaningOfLife(22)).toBe('The meaning of life is 22');
}));

View File

@ -11,7 +11,7 @@ import {Component} from 'angular2/core';
export class <%= jsComponentName %>App {
defaultMeaning: number = 42;
meaningOfLife(meaning) {
meaningOfLife(meaning?: number) {
return `The meaning of life is ${meaning || this.defaultMeaning}`;
}
}