Commit c026b65
Update typings (#493)
* 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')}/>
))
```1 parent 97d11fb commit c026b65
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | | - | |
| 14 | + | |
0 commit comments