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
However this throws a type error as Type 'string' is not assignable to type 'User'.. So I'm just wondering am I missing something here to be able to use the mapping with typescript on complex objects?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
I am having issues with mapping complex types to more usable args in storybook.
I created an example using one of your storybook examples and these are the props of the component
I then do the mapping as shown in the docs
I then render the story like so, which works for storybook and correctly renders
userOne
However this throws a type error as
Type 'string' is not assignable to type 'User'.
. So I'm just wondering am I missing something here to be able to use the mapping with typescript on complex objects?Additional information
No response
Create a reproduction
https://stackblitz.com/edit/github-xzv4rz?file=src%2Fstories%2FHeader.stories.ts
Beta Was this translation helpful? Give feedback.
All reactions