Skip to content

Commit

Permalink
chore: Add notes about type errors in create-runtime-stories
Browse files Browse the repository at this point in the history
  • Loading branch information
xeho91 committed Jun 16, 2024
1 parent 0c29012 commit 807536d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/runtime/create-runtime-stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export const createRuntimeStories = (Stories: Component, meta: Meta) => {
for (const [exportName, story] of repository.stories) {
const storyObj: StoryObj<StoryRenderer> = {
...story,
// @ts-expect-error WARN: Here we are attempting to convert every `StoryCmp` into `StoryObj`, and the types are different
render: (args, storyContext) => ({
Component: StoryRenderer,
props: {
Expand All @@ -75,6 +76,7 @@ export const createRuntimeStories = (Stories: Component, meta: Meta) => {
return delegate(storyContext);
}

// @ts-expect-error WARN: It should not affect user perspective- the problem lies in this addon's type `SvelteRenderer` missing type constrains or default generic parameter type
return play(storyContext);
};
}
Expand Down

0 comments on commit 807536d

Please sign in to comment.