From 35a78403b9ea37914b8df6c210831ee3da6b2579 Mon Sep 17 00:00:00 2001 From: Keisuke Kan <9renpoto@gmail.com> Date: Thu, 8 Sep 2016 19:54:21 +0900 Subject: [PATCH] chore(config) update typings --- config/storybook.d.ts | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/config/storybook.d.ts b/config/storybook.d.ts index e1a997b9be8b..0f34d947dabf 100644 --- a/config/storybook.d.ts +++ b/config/storybook.d.ts @@ -1,8 +1,27 @@ +// Type definitions for dist/client/index.js +// Project: https://github.com/kadirahq/react-storybook + declare var module: any; // dangerous +interface StoryApi { + add (storyName: string, callback: Function): StoryApi; +} + interface Story { - add (storyName: string, callback: Function): Story; + name: string; + render: Function[]; } -export function storiesOf(name: string, module: any): Story; +interface Book { + kind: string; + stories: Story[]; +} + +export function storiesOf(name: string, module: any): StoryApi; +export function setAddon(module: any): void; +export function addDecorator(module: Function); +export function getStorybook(): Book[]; +export function configure(loaders: Function[], module: any); + export function action(name: string, ...params: any[]): Function; +export function linkTo(name: string, story: any): Function;