UNPKG

1.6 kBTypeScriptView Raw
1import type { Component, AsyncComponent } from 'vue';
2import type { Args, ComponentAnnotations, StoryAnnotations, AnnotatedStoryFn } from '@storybook/csf';
3import type { StoryFnVueReturnType } from './types';
4export type { Args, ArgTypes, Parameters, StoryContext } from '@storybook/csf';
5export declare type VueFramework = {
6 component: Component<any, any, any, any> | AsyncComponent<any, any, any, any>;
7 storyResult: StoryFnVueReturnType;
8};
9/**
10 * Metadata to configure the stories for a component.
11 *
12 * @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export)
13 */
14export declare type Meta<TArgs = Args> = ComponentAnnotations<VueFramework, TArgs>;
15/**
16 * Story function that represents a CSFv2 component example.
17 *
18 * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
19 */
20export declare type StoryFn<TArgs = Args> = AnnotatedStoryFn<VueFramework, TArgs>;
21/**
22 * Story function that represents a CSFv3 component example.
23 *
24 * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
25 */
26export declare type StoryObj<TArgs = Args> = StoryAnnotations<VueFramework, TArgs>;
27/**
28 * Story function that represents a CSFv2 component example.
29 *
30 * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
31 *
32 * NOTE that in Storybook 7.0, this type will be renamed to `StoryFn` and replaced by the current `StoryObj` type.
33 *
34 */
35export declare type Story<TArgs = Args> = StoryFn<TArgs>;