From 86fd52c72571ffc3c6f47492434d068679ba59b4 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Fri, 11 Nov 2022 14:59:57 +0100 Subject: [PATCH] Better fix of testing-utils type --- code/lib/store/src/csf/testing-utils/index.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/lib/store/src/csf/testing-utils/index.ts b/code/lib/store/src/csf/testing-utils/index.ts index 8ad8fa628fb5..4db39dba0c6e 100644 --- a/code/lib/store/src/csf/testing-utils/index.ts +++ b/code/lib/store/src/csf/testing-utils/index.ts @@ -1,3 +1,4 @@ +import type { AnnotatedStoryFn } from '@storybook/csf'; import { isExportStory } from '@storybook/csf'; import type { Renderer, @@ -9,7 +10,7 @@ import type { Store_ComposeStory, Store_CSFExports, StoryContext, - StoryFn, + Parameters, } from '@storybook/types'; import { HooksContext } from '@storybook/addons'; @@ -35,7 +36,7 @@ export function composeStory = GLOBAL_STORYBOOK_PROJECT_ANNOTATIONS, defaultConfig: ProjectAnnotations = {}, exportsName?: string -): StoryFn { +) { if (storyAnnotations === undefined) { throw new Error('Expected a story but received undefined.'); } @@ -86,7 +87,7 @@ export function composeStory