You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
With Angular strict mode enabled, the generated Storybook 6.0 code shows multiple type errors.
To Reproduce
Steps to reproduce the behavior:
Create a new Angular project with npx -p @angular/cli ng new storybook-test --strict
In the new folder, install storybook with npx sb init
See 4 error messages:
ERROR in /path/to/project/storybook-test/storybook-test/src/stories/button.component.ts
ERROR in /path/to/project/storybook-test/storybook-test/src/stories/button.component.ts(20,3):
TS2564: Property 'primary' has no initializer and is not definitely assigned in the constructor.
ERROR in /path/to/project/storybook-test/src/stories/button.component.ts
ERROR in /path/to/project/storybook-test/storybook-test/src/stories/button.component.ts(26,3):
TS2564: Property 'backgroundColor' has no initializer and is not definitely assigned in the constructor.
ERROR in /path/to/project/storybook-test/src/stories/button.component.ts
ERROR in /path/to/project/storybook-test/src/stories/button.component.ts(40,3):
TS2564: Property 'label' has no initializer and is not definitely assigned in the constructor.
ERROR in /path/to/project/storybook-test/src/stories/Header.stories.ts
ERROR in /path/to/project/storybook-test/src/stories/Header.stories.ts(27,3):
TS2322: Type '{}' is not assignable to type 'null | undefined'.
Type '{}' is not assignable to type 'null'.
Expected behavior
The default installation should not show Typescript errors.
The text was updated successfully, but these errors were encountered:
aloifolia
changed the title
Storybook 6.0 has type errors in an Angular 10.0.6
Storybook 6.0 has type errors in a Angular 10.0.6 project
Aug 17, 2020
aloifolia
changed the title
Storybook 6.0 has type errors in a Angular 10.0.6 project
Storybook 6.0 has type errors in a strict Angular 10.0.6 project
Aug 17, 2020
Describe the bug
With Angular strict mode enabled, the generated Storybook 6.0 code shows multiple type errors.
To Reproduce
Steps to reproduce the behavior:
npx -p @angular/cli ng new storybook-test --strict
npx sb init
Expected behavior
The default installation should not show Typescript errors.
System:
The text was updated successfully, but these errors were encountered: