mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-21 22:34:21 +08:00
chore: update blueprints considering noImplicityAny
This commit is contained in:
parent
5dcdf51182
commit
489d2bacf0
@ -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');
|
||||
}));
|
||||
|
@ -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}`;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user