From 206c06ff0ff7a78408d6767854de92c1d0d77753 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 20 Apr 2023 10:29:11 +0200 Subject: [PATCH] simplify the export type of addon actions decorator so it doesn't get generated incorrectly --- code/addons/actions/src/decorator.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/addons/actions/src/decorator.ts b/code/addons/actions/src/decorator.ts index 4851a1bfad85..09c2589acc53 100644 --- a/code/addons/actions/src/decorator.ts +++ b/code/addons/actions/src/decorator.ts @@ -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'; @@ -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,