From 489d2bacf00375f1c1a19890c39d30cd85f175f0 Mon Sep 17 00:00:00 2001 From: Ciro Nunes Date: Tue, 15 Dec 2015 13:25:20 -0200 Subject: [PATCH] chore: update blueprints considering `noImplicityAny` --- addon/ng2/blueprints/ng2/files/src/app/__name__.spec.ts | 4 ++-- addon/ng2/blueprints/ng2/files/src/app/__name__.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addon/ng2/blueprints/ng2/files/src/app/__name__.spec.ts b/addon/ng2/blueprints/ng2/files/src/app/__name__.spec.ts index b7c3d56b1e..f118dc87b2 100644 --- a/addon/ng2/blueprints/ng2/files/src/app/__name__.spec.ts +++ b/addon/ng2/blueprints/ng2/files/src/app/__name__.spec.ts @@ -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'); })); diff --git a/addon/ng2/blueprints/ng2/files/src/app/__name__.ts b/addon/ng2/blueprints/ng2/files/src/app/__name__.ts index 86601ac047..832a90bb12 100644 --- a/addon/ng2/blueprints/ng2/files/src/app/__name__.ts +++ b/addon/ng2/blueprints/ng2/files/src/app/__name__.ts @@ -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}`; } }