In my non-tyepscript react component I had
componentWillMount() {
this.delayedSearch = _.debounce((val) => {
this.onQuerySearch(val);
}, 1000);
}
for debouncing typing on an input field. Then on an input field I had <input onChange={event => this.delayedSearch(e.value)}>
Now, however, when I switch to Typescipt, my assignment of the _.debounce gives me an error:
Property 'delayedSearch' does not exist on type 'UserSearch'.
How can I fix this?