Skip to content

Commit

Permalink
Merge pull request #12081 from storybookjs/fix-12070-angular-cli-stor…
Browse files Browse the repository at this point in the history
…y-templates

Angular: Make CLI templates compatible with TS strict mode
  • Loading branch information
shilman committed Aug 17, 2020
2 parents 5898887 + 37318e9 commit 57e614b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/cli/src/frameworks/angular/button.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ export default class ButtonComponent {
* Is this the principal call to action on the page?
*/
@Input()
primary: boolean;
primary = false;

/**
* What background color to use
*/
@Input()
backgroundColor: string;
backgroundColor?: string;

/**
* How large should the button be?
Expand All @@ -37,7 +37,7 @@ export default class ButtonComponent {
* @required
*/
@Input()
label: string;
label = 'Button';

/**
* Optional click handler
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/src/frameworks/angular/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';
})
export default class HeaderComponent {
@Input()
user = null;
user: unknown = null;

@Output()
onLogin = new EventEmitter<Event>();
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/src/frameworks/angular/page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';
})
export default class PageComponent {
@Input()
user = null;
user: unknown = null;

@Output()
onLogin = new EventEmitter<Event>();
Expand Down
2 changes: 1 addition & 1 deletion scripts/run-e2e-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const baseAngular: Parameters = {
version: 'latest',
generator: [
`yarn add @angular/cli@{{version}} --no-lockfile --non-interactive --silent --no-progress`,
`npx ng new {{name}}-{{version}} --routing=true --minimal=true --style=scss --skipInstall=true`,
`npx ng new {{name}}-{{version}} --routing=true --minimal=true --style=scss --skipInstall=true --strict`,
].join(' && '),
additionalDeps: ['react', 'react-dom'],
};
Expand Down

0 comments on commit 57e614b

Please sign in to comment.