From 0524dad63e434fe552c68c5a66616714e933ef10 Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Tue, 22 Nov 2022 16:54:30 +1100 Subject: [PATCH] Remove unused client-api types --- code/lib/types/src/index.ts | 1 - code/lib/types/src/modules/client-api.ts | 80 ------------------------ 2 files changed, 81 deletions(-) delete mode 100644 code/lib/types/src/modules/client-api.ts diff --git a/code/lib/types/src/index.ts b/code/lib/types/src/index.ts index a2816efba39..e221883fff1 100644 --- a/code/lib/types/src/index.ts +++ b/code/lib/types/src/index.ts @@ -4,7 +4,6 @@ export * from './modules/csf'; export * from './modules/addons'; export * from './modules/story'; -export * from './modules/client-api'; export * from './modules/core-common'; export * from './modules/builder'; export * from './modules/api'; diff --git a/code/lib/types/src/modules/client-api.ts b/code/lib/types/src/modules/client-api.ts deleted file mode 100644 index 78bcc6abe1d..00000000000 --- a/code/lib/types/src/modules/client-api.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* eslint-disable @typescript-eslint/naming-convention */ -import type { Addon_StoryApi, Addon_Type } from './addons'; -import type { RenderContext } from './story'; -import type { - Args, - ArgTypes, - DecoratorFunction, - Renderer, - LoaderFunction, - Parameters, - LegacyStoryFn, - StoryContext, - StoryFn, - StoryId, - StoryIdentifier, - StoryKind, - StoryName, - ViewMode, -} from './csf'; - -export interface ClientAPI_ErrorLike { - message: string; - stack: string; -} - -// Metadata about a story that can be set at various levels: global, for a kind, or for a single story. -export interface ClientAPI_StoryMetadata { - parameters?: Parameters; - decorators?: DecoratorFunction[]; - loaders?: LoaderFunction[]; -} -export type ClientAPI_ArgTypesEnhancer = (context: StoryContext) => ArgTypes; -export type ClientAPI_ArgsEnhancer = (context: StoryContext) => Args; - -type StorySpecifier = StoryId | { name: StoryName; kind: StoryKind } | '*'; - -export interface ClientAPI_StoreSelectionSpecifier { - storySpecifier: StorySpecifier; - viewMode: ViewMode; - singleStory?: boolean; - args?: Args; - globals?: Args; -} - -export interface ClientAPI_StoreSelection { - storyId: StoryId; - viewMode: ViewMode; -} - -export type ClientAPI_AddStoryArgs = StoryIdentifier & { - storyFn: StoryFn; - parameters?: Parameters; - decorators?: DecoratorFunction[]; - loaders?: LoaderFunction[]; -}; - -export type ClientAPI_ClientApiReturnFn = ( - ...args: any[] -) => Addon_StoryApi; - -export interface ClientAPI_ClientApiAddon extends Addon_Type { - apply: (a: Addon_StoryApi, b: any[]) => any; -} - -export interface ClientAPI_ClientApiAddons { - [key: string]: ClientAPI_ClientApiAddon; -} - -export type ClientAPI_RenderContextWithoutStoryContext = Omit; - -export interface ClientAPI_GetStorybookStory { - name: string; - render: LegacyStoryFn; -} - -export interface ClientAPI_GetStorybookKind { - kind: string; - fileName: string; - stories: ClientAPI_GetStorybookStory[]; -}