diff --git a/types/storybook__react/index.d.ts b/types/storybook__react/index.d.ts index 7a52903bc7..1228124376 100644 --- a/types/storybook__react/index.d.ts +++ b/types/storybook__react/index.d.ts @@ -4,11 +4,11 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -/// +/// import * as React from 'react'; -export type Renderable = React.StatelessComponent | React.ComponentClass | JSX.Element; +export type Renderable = React.ComponentType | JSX.Element; export type RenderFunction = () => Renderable; export type StoryDecorator = (story: RenderFunction, context: { kind: string, story: string }) => Renderable | null; @@ -20,7 +20,7 @@ export interface Story { } export function addDecorator(decorator: StoryDecorator): void; -export function configure(fn: () => void, module: any): void; +export function configure(fn: () => void, module: NodeModule): void; export function setAddon(addon: object): void; export function storiesOf(name: string, module: NodeModule): Story; export function storiesOf(name: string, module: NodeModule): Story & T;