diff --git a/code/lib/manager-api/src/index.tsx b/code/lib/manager-api/src/index.tsx index 24e288782ad..fbb8b74a642 100644 --- a/code/lib/manager-api/src/index.tsx +++ b/code/lib/manager-api/src/index.tsx @@ -517,11 +517,8 @@ export function useArgTypes(): ArgTypes { export { addons } from './lib/addons'; -/** - * We need to rename this so it's not compiled to a straight re-export - * Our globalization plugin can't handle an import and export of the same name in different lines - * @deprecated - */ +// We need to rename this so it's not compiled to a straight re-export +// Our globalization plugin can't handle an import and export of the same name in different lines const typesX = types; export { typesX as types }; diff --git a/code/lib/types/src/modules/addons.ts b/code/lib/types/src/modules/addons.ts index fe4fa8551cf..c1325e3f07e 100644 --- a/code/lib/types/src/modules/addons.ts +++ b/code/lib/types/src/modules/addons.ts @@ -358,7 +358,12 @@ export interface Addon_BaseType { * This is called as a function, so if you want to use hooks, * your function needs to return a JSX.Element within which components are rendered */ - render: (renderOptions: Partial) => ReactElement | null; + render: (props: Partial) => ReturnType>>; + // TODO: for Storybook 9 I'd like to change this to be: + // render: FC>; + // This would bring it in line with how every other addon is set up. + // We'd need to change how the render function is called in the manager: + // https://github.com/storybookjs/storybook/blob/4e6fc0dde0842841d99cb3cf5148ca293a950301/code/ui/manager/src/components/preview/Preview.tsx#L105 /** * @unstable */