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
Storybookjs's standard out-of-the-box compiler configuration for react typescript applications incorrectly compile Typescript code by removing some constructor bodies. Specifically, my class:
The text was updated successfully, but these errors were encountered:
tobyhinloopen
changed the title
Typescript constructor body incorrectly compiled (with example repo)
Typescript constructor arguments get thrown away (with example repo)
Apr 8, 2021
Describe the bug
Storybookjs's standard out-of-the-box compiler configuration for react typescript applications incorrectly compile Typescript code by removing some constructor bodies. Specifically, my class:
my
time.ts
classis compiled to:
BROKEN JS code as generated by storybookjs
Note how
this.time = time
is missing. The correct JS code should be something like:CORRECT JS code as generated by default typescript compiler
To Reproduce
npm run storybook
Expected behavior
this.time
totime
System
Environment Info:
The text was updated successfully, but these errors were encountered: