diff --git a/app/react/README.md b/app/react/README.md index 31131395211d..573ea112c831 100644 --- a/app/react/README.md +++ b/app/react/README.md @@ -35,6 +35,10 @@ Here are some featured storybooks that you can reference to see how Storybook wo - [Demo of React Dates](http://airbnb.io/react-dates/) - [source](https://github.com/airbnb/react-dates) - [Demo of React Native Web](http://necolas.github.io/react-native-web/storybook/) - [source](https://github.com/necolas/react-native-web) +## Typescript + +If you are using Typescript, make sure you have the type definitions installed via `yarn add @types/node @types/react @types/storybook__react --dev`. + ## Docs - [Basics](https://storybook.js.org/docs/react-storybook/basics/introduction) diff --git a/app/react/config/storybook.d.ts b/app/react/config/storybook.d.ts deleted file mode 100644 index a7c34ab3c8b6..000000000000 --- a/app/react/config/storybook.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -declare var module: any; // dangerous - -type RenderFunction = Function; - -interface StoryDecorator { - (story: RenderFunction, context: { kind: string, story: string }): Object | null; -} - -interface Story { - add (storyName: string, callback: Function): Story; - addDecorator (decorator: StoryDecorator): Story; -} - -export function addDecorator(decorator: StoryDecorator): void; -export function configure(fn: Function, module: any): void; -export function linkTo(name: string, ...params: any[]): void; -export function storiesOf(name: string, module: any): Story; -export function action(name: string, ...params: any[]): any; - -type StoryObject = { - name: string, - render: RenderFunction, -}; - -type StoryBucket = { - kind: string, - stories: StoryObject[], -}; - -export function getStorybook(): StoryBucket[]; diff --git a/app/react/package.json b/app/react/package.json index 29439b5b8c5e..4f9b2808159a 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -8,7 +8,6 @@ }, "license": "MIT", "main": "dist/client/index.js", - "typings": "./config/storybook.d.ts", "bin": { "build-storybook": "./dist/server/build.js", "start-storybook": "./dist/server/index.js",