Skip to content

Commit

Permalink
Undo change to CSFExports type
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeasday committed Jun 23, 2022
1 parent 4f315c4 commit fe9af61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 6 additions & 1 deletion lib/store/src/csf/testing-utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@ export function composeStories<TModule extends CSFExports>(
}

const result = Object.assign(storiesMap, {
[exportsName]: composeStoryFn(story, meta, globalConfig, exportsName),
[exportsName]: composeStoryFn(
story as LegacyStoryAnnotationsOrFn,
meta,
globalConfig,
exportsName
),
});
return result;
}, {});
Expand Down
6 changes: 1 addition & 5 deletions lib/store/src/csf/testing-utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@ import type {
ComponentAnnotations,
Args,
StoryContext,
LegacyAnnotatedStoryFn,
} from '@storybook/csf';

export type CSFExports<TFramework extends AnyFramework = AnyFramework> = Record<
string,
LegacyAnnotatedStoryFn<TFramework>
> & {
export type CSFExports<TFramework extends AnyFramework = AnyFramework> = {
default: ComponentAnnotations<TFramework, Args>;
__esModule?: boolean;
__namedExportsOrder?: string[];
Expand Down

0 comments on commit fe9af61

Please sign in to comment.