You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm missing a option like https://www.npmjs.com/package/react-async-hook has for typescript that you can give as second option a array of the values you want to give to the async function. It is also nice typed because the array says also witch value it expecting related to the async function.
The text was updated successfully, but these errors were encountered:
LennardWesterveld
changed the title
[Feature request] Better way to add variables with typescript
[Feature request] Better way to add function argument with typescript
Aug 8, 2019
Hey Lennard, thanks for the feedback. I'm looking into ways to improve TypeScript support. In fact I've already found a few places where things can be improved.
You can in fact pass additional props to the async function, but their type will just be any. I'll investigate ways to make these typed somehow, if you want you can take a stab at it. Make sure to check out #73, there's a lot of improvements in there already. 👍
ghengeveld
changed the title
[Feature request] Better way to add function argument with typescript
Better TypeScript type inference for promiseFn / deferFn args
Aug 13, 2019
I'm missing a option like https://www.npmjs.com/package/react-async-hook has for typescript that you can give as second option a array of the values you want to give to the async function. It is also nice typed because the array says also witch value it expecting related to the async function.
The text was updated successfully, but these errors were encountered: