From 68634fc0222e6723df6d900f7bd47a4d967d0971 Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Tue, 7 Mar 2023 17:13:57 +1100 Subject: [PATCH] Use `Of` type in `useOf` argument --- code/ui/blocks/src/blocks/useOf.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/ui/blocks/src/blocks/useOf.ts b/code/ui/blocks/src/blocks/useOf.ts index 8e5d9d5f7a4f..8c2c55310029 100644 --- a/code/ui/blocks/src/blocks/useOf.ts +++ b/code/ui/blocks/src/blocks/useOf.ts @@ -1,6 +1,5 @@ import type { DocsContextProps, - ModuleExport, ResolvedModuleExportType, ResolvedModuleExportFromType, } from '@storybook/types'; @@ -16,7 +15,7 @@ export type Of = Parameters[0]; * if the resolved module is a component it will include the project annotations */ export const useOf = ( - moduleExportOrType: ModuleExport | TType, + moduleExportOrType: Of, validTypes?: TType[] ): ResolvedModuleExportFromType => { const context = useContext(DocsContext);