From 56f96a6ccb42ba3f373886d25c6316763bedec67 Mon Sep 17 00:00:00 2001 From: Joscha Feth Date: Thu, 22 Jun 2017 19:35:04 +0200 Subject: [PATCH] remove typings for @storybook/addon-knobs, references https://github.com/DefinitelyTyped/DefinitelyTyped/issues/17399 --- addons/knobs/package.json | 1 - addons/knobs/storybook-addon-knobs.d.ts | 46 ------------------------- 2 files changed, 47 deletions(-) delete mode 100644 addons/knobs/storybook-addon-knobs.d.ts diff --git a/addons/knobs/package.json b/addons/knobs/package.json index df474f9e00f1..ccbecb4eb19e 100644 --- a/addons/knobs/package.json +++ b/addons/knobs/package.json @@ -4,7 +4,6 @@ "description": "Storybook Addon Prop Editor Component", "license": "MIT", "main": "dist/index.js", - "typings": "./storybook-addon-knobs.d.ts", "repository": { "type": "git", "url": "https://github.com/storybooks/storybook.git" diff --git a/addons/knobs/storybook-addon-knobs.d.ts b/addons/knobs/storybook-addon-knobs.d.ts deleted file mode 100644 index 37d0f8e751d3..000000000000 --- a/addons/knobs/storybook-addon-knobs.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import * as React from 'react'; - -interface KnobOption { - value: T, - type: 'text' | 'boolean' | 'number' | 'color' | 'object' | 'select' | 'date', -} - -interface StoryContext { - kind: string, - story: string, -} - -interface NumberOptions { - range: boolean, - min: number, - max: number, - step: number, -} - -export function knob(name: string, options: KnobOption): T; - -export function text(name: string, value: string | null): string; - -export function boolean(name: string, value: boolean): boolean; - -export function number(name: string, value: number, options?: NumberOptions): number; - -export function color(name: string, value: string): string; - -export function object(name: string, value: T): T; - -export function select(name: string, options: { [s: string]: T }, value: string): T; -export function select(name: string, options: string[], value: string): string; - -export function date(name: string, value?: Date): Date; - -interface IWrapStoryProps { - context?: Object; - storyFn?: Function; - channel?: Object; - knobStore?: Object; - initialContent?: Object; -} - -export function withKnobs(storyFn: Function, context: StoryContext): React.ReactElement; -export function withKnobsOptions(options: Object): (storyFn: Function, context: StoryContext) => React.ReactElement;