Skip to content

Commit

Permalink
Better fix of testing-utils type
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen committed Nov 11, 2022
1 parent f743151 commit 86fd52c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions code/lib/store/src/csf/testing-utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { AnnotatedStoryFn } from '@storybook/csf';
import { isExportStory } from '@storybook/csf';
import type {
Renderer,
Expand All @@ -9,7 +10,7 @@ import type {
Store_ComposeStory,
Store_CSFExports,
StoryContext,
StoryFn,
Parameters,
} from '@storybook/types';

import { HooksContext } from '@storybook/addons';
Expand All @@ -35,7 +36,7 @@ export function composeStory<TRenderer extends Renderer = Renderer, TArgs extend
projectAnnotations: ProjectAnnotations<TRenderer> = GLOBAL_STORYBOOK_PROJECT_ANNOTATIONS,
defaultConfig: ProjectAnnotations<TRenderer> = {},
exportsName?: string
): StoryFn<TRenderer, TArgs> {
) {
if (storyAnnotations === undefined) {
throw new Error('Expected a story but received undefined.');
}
Expand Down Expand Up @@ -86,7 +87,7 @@ export function composeStory<TRenderer extends Renderer = Renderer, TArgs extend
composedStory.storyName = storyName;
composedStory.args = story.initialArgs;
composedStory.play = story.playFunction as Store_ComposedStoryPlayFn;
composedStory.parameters = story.parameters;
composedStory.parameters = story.parameters as Parameters;

return composedStory;
}
Expand Down

0 comments on commit 86fd52c

Please sign in to comment.