Skip to content

Commit

Permalink
Merge pull request #22175 from storybookjs/norbert/fix-21820
Browse files Browse the repository at this point in the history
Bug: simplify the export type of addon actions decorator so it doesn't get generated incorrectly
  • Loading branch information
ndelangen authored and shilman committed Apr 24, 2023
1 parent bd18a04 commit 1f3d5ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/addons/actions/src/decorator.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { global } from '@storybook/global';
import { useEffect, makeDecorator } from '@storybook/preview-api';
import type { Addon_DecoratorFunction } from '@storybook/types';
import { actions } from './runtime/actions';

import { PARAM_KEY } from './constants';
Expand Down Expand Up @@ -51,7 +52,7 @@ const applyEventHandlers = (actionsFn: any, ...handles: any[]) => {
}, [root, actionsFn, handles]);
};

export const withActions = makeDecorator({
export const withActions: Addon_DecoratorFunction = makeDecorator({
name: 'withActions',
parameterName: PARAM_KEY,
skipIfNoParametersOrOptions: true,
Expand Down

0 comments on commit 1f3d5ef

Please sign in to comment.