UNPKG

1.24 kBTypeScriptView Raw
1import { StrictArgTypes } from '@storybook/csf';
2import { PropDef } from './PropDef';
3import { Component } from '../../blocks/types';
4export declare type PropsExtractor = (component: Component) => {
5 rows?: PropDef[];
6} | null;
7export declare type ArgTypesExtractor = (component: Component) => StrictArgTypes | null;
8export interface DocgenType {
9 name: string;
10 description?: string;
11 required?: boolean;
12 value?: any;
13}
14export interface DocgenPropType extends DocgenType {
15 value?: any;
16 raw?: string;
17 computed?: boolean;
18}
19export interface DocgenFlowType extends DocgenType {
20 type?: string;
21 raw?: string;
22 signature?: any;
23 elements?: any[];
24}
25export interface DocgenTypeScriptType extends DocgenType {
26}
27export interface DocgenPropDefaultValue {
28 value: string;
29 computed?: boolean;
30 func?: boolean;
31}
32export interface DocgenInfo {
33 type?: DocgenPropType;
34 flowType?: DocgenFlowType;
35 tsType?: DocgenTypeScriptType;
36 required: boolean;
37 description?: string;
38 defaultValue?: DocgenPropDefaultValue;
39}
40export declare enum TypeSystem {
41 JAVASCRIPT = "JavaScript",
42 FLOW = "Flow",
43 TYPESCRIPT = "TypeScript",
44 UNKNOWN = "Unknown"
45}
46export type { PropDef };