diff --git a/code/lib/types/src/modules/addons.ts b/code/lib/types/src/modules/addons.ts index 424fa80579c5..f4085d06d170 100644 --- a/code/lib/types/src/modules/addons.ts +++ b/code/lib/types/src/modules/addons.ts @@ -162,7 +162,11 @@ export type Addon_BaseDecorators = Array< (story: () => StoryFnReturnType, context: Addon_StoryContext) => StoryFnReturnType >; -export interface Addon_BaseAnnotations { +export interface Addon_BaseAnnotations< + TArgs, + StoryFnReturnType, + TRenderer extends Renderer = Renderer +> { /** * Dynamic data that are provided (and possibly updated by) Storybook and its addons. * @see [Arg story inputs](https://storybook.js.org/docs/react/api/csf#args-story-inputs) @@ -192,12 +196,12 @@ export interface Addon_BaseAnnotations { /** * Define a custom render function for the story(ies). If not passed, a default render function by the framework will be used. */ - render?: (args: TArgs, context: Addon_StoryContext) => StoryFnReturnType; + render?: (args: TArgs, context: Addon_StoryContext) => StoryFnReturnType; /** * Function that is executed after the story is rendered. */ - play?: (context: Addon_StoryContext) => Promise | void; + play?: (context: Addon_StoryContext) => Promise | void; } export interface Addon_Annotations