Skip to content

Commit

Permalink
types: export BaseStoryFn and BaseStoryObject
Browse files Browse the repository at this point in the history
These types could be needed by other libraries in order to do proper inferring or typecasting
  • Loading branch information
yannbf committed Jul 14, 2021
1 parent e9d7d75 commit 8155e2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/addons/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,14 @@ export interface BaseMeta<ComponentType> {
subcomponents?: Record<string, ComponentType>;
}

type BaseStoryObject<Args, StoryFnReturnType> = {
export type BaseStoryObject<Args, StoryFnReturnType> = {
/**
* Override the display name in the UI
*/
storyName?: string;
};

type BaseStoryFn<Args, StoryFnReturnType> = {
export type BaseStoryFn<Args, StoryFnReturnType> = {
(args: Args, context: StoryContext): StoryFnReturnType;
} & BaseStoryObject<Args, StoryFnReturnType>;

Expand Down

0 comments on commit 8155e2b

Please sign in to comment.