File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1010 },
1111 "include" : [
1212 " stories" ,
13+ " types" ,
1314 " ../src"
1415 ],
1516 "exclude" : [
Original file line number Diff line number Diff line change 1+ // Type definitions for @storybook /react 4.0.0-alpha
2+ /// <reference types="webpack-env" />
3+
4+ import * as React from 'react'
5+
6+ import { Options } from '@storybook/addon-info'
7+
8+ declare module '@storybook/react' {
9+ export interface Story {
10+ readonly kind : string
11+ add (
12+ storyName : string ,
13+ callback : RenderFunction ,
14+ options ?: { info : Options & { text ?: string | React . ReactNode } }
15+ ) : this
16+ addDecorator ( decorator : StoryDecorator ) : this
17+ }
18+
19+ export function addDecorator ( decorator : StoryDecorator ) : void
20+ export function configure ( fn : ( ) => void , module : NodeModule ) : void
21+ export function setAddon ( addon : object ) : void
22+ export function storiesOf ( name : string , module : NodeModule ) : Story
23+ export function storiesOf < T > ( name : string , module : NodeModule ) : Story & T
24+ export function forceReRender ( ) : void
25+
26+ export interface StoryObject {
27+ name : string
28+ render : RenderFunction
29+ }
30+
31+ export interface StoryBucket {
32+ kind : string
33+ stories : StoryObject [ ]
34+ }
35+
36+ export function getStorybook ( ) : StoryBucket [ ]
37+ }
You can’t perform that action at this time.
0 commit comments