mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 00:32:06 +08:00
* add typings for `linkTo` addon * action must return `any` since it brakes typings chain So, having such example leads to the typescript error `error TS2322: Type 'Function' is not assignable to type '(newVal: string) => void'.` ```js interface Props { onChange?(newVal: string): void, } class ExampleComponent extends Component<Props, void> { render() { return ( <input onChange={this.props.onChange}>Hi!</div> ) } } storiesOf('Example', module) .add('Regular use case', () => ( <ExampleComponent onChange={action('changed')}/> )) ```