-
Notifications
You must be signed in to change notification settings - Fork 88
/
storybook.d.ts
34 lines (31 loc) · 1.02 KB
/
storybook.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
declare module '@storybook/manager-api' {
import { EventEmitter } from 'events';
export interface API {
raw?: () => { id: string; kind: string; name: string }[];
getStorybook(): { kind: string; stories: { name: string }[] }[];
}
export interface StoryKind {
kind: string;
stories: string[];
}
export class Channel extends EventEmitter {
on(name: 'setStories', listener: (event: { stories: StoryKind[] }) => void): this;
once(name: 'setStories', listener: (event: { stories: StoryKind[] }) => void): this;
}
export interface Addons {
register(name: string, callback: (api: API) => void): void;
getChannel(): Channel;
}
export const addons: Addons;
}
declare module '@storybook/preview-api' {
interface MakeDecorator {
(options: {
name: string;
parameterName: string;
skipIfNoParametersOrOptions: boolean;
wrapper: (getStory: any, context: any, args: { parameters: any; options: any }) => any;
}): Function;
}
export const makeDecorator: MakeDecorator;
}