From 6b9b8cb9a345a892b660d54a9690ba4b18644bd0 Mon Sep 17 00:00:00 2001 From: chakAs3 Date: Fri, 23 Jun 2023 23:56:14 +0400 Subject: [PATCH 1/2] change StoryFnReactReturnType to JSX.Element --- code/renderers/react/src/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/renderers/react/src/types.ts b/code/renderers/react/src/types.ts index 1b6748259013..850f268d6cc3 100644 --- a/code/renderers/react/src/types.ts +++ b/code/renderers/react/src/types.ts @@ -1,4 +1,4 @@ -import type { ComponentType, ReactElement } from 'react'; +import type { ComponentType } from 'react'; import type { WebRenderer } from '@storybook/types'; export type { RenderContext } from '@storybook/types'; @@ -18,4 +18,4 @@ export interface ShowErrorArgs { description: string; } -export type StoryFnReactReturnType = ReactElement; +export type StoryFnReactReturnType = JSX.Element; From 7fa57a93dd7e40a868c269ff66e472833efc3fa1 Mon Sep 17 00:00:00 2001 From: chakAs3 Date: Sat, 24 Jun 2023 01:00:45 +0400 Subject: [PATCH 2/2] remove double export from --- code/renderers/react/src/types.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/renderers/react/src/types.ts b/code/renderers/react/src/types.ts index 850f268d6cc3..637f1b5a5ebc 100644 --- a/code/renderers/react/src/types.ts +++ b/code/renderers/react/src/types.ts @@ -1,8 +1,7 @@ import type { ComponentType } from 'react'; import type { WebRenderer } from '@storybook/types'; -export type { RenderContext } from '@storybook/types'; -export type { StoryContext } from '@storybook/types'; +export type { RenderContext, StoryContext } from '@storybook/types'; /** * @deprecated Use `ReactRenderer` instead.