From fe9af61a1a1cfa90137c23d1f3b821fcd7d3f4e9 Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Thu, 23 Jun 2022 13:48:48 +1000 Subject: [PATCH] Undo change to `CSFExports` type --- lib/store/src/csf/testing-utils/index.ts | 7 ++++++- lib/store/src/csf/testing-utils/types.ts | 6 +----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/store/src/csf/testing-utils/index.ts b/lib/store/src/csf/testing-utils/index.ts index 6426f15d80a6..6fddcbce6f5e 100644 --- a/lib/store/src/csf/testing-utils/index.ts +++ b/lib/store/src/csf/testing-utils/index.ts @@ -124,7 +124,12 @@ export function composeStories( } const result = Object.assign(storiesMap, { - [exportsName]: composeStoryFn(story, meta, globalConfig, exportsName), + [exportsName]: composeStoryFn( + story as LegacyStoryAnnotationsOrFn, + meta, + globalConfig, + exportsName + ), }); return result; }, {}); diff --git a/lib/store/src/csf/testing-utils/types.ts b/lib/store/src/csf/testing-utils/types.ts index 747427ecb23f..498e091aedac 100644 --- a/lib/store/src/csf/testing-utils/types.ts +++ b/lib/store/src/csf/testing-utils/types.ts @@ -5,13 +5,9 @@ import type { ComponentAnnotations, Args, StoryContext, - LegacyAnnotatedStoryFn, } from '@storybook/csf'; -export type CSFExports = Record< - string, - LegacyAnnotatedStoryFn -> & { +export type CSFExports = { default: ComponentAnnotations; __esModule?: boolean; __namedExportsOrder?: string[];