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
It would be nice to have the option to provide the argument types of the promiseFn
exportconstuseJoinWaitlist=()=>{typeArgs={email: string}returnuseAsync<JoinWaitlistResponse,Args>({promiseFn: ({// Email type is now defined and is of type `string`
email,})=>getClient().post<JoinWaitlistResponse>("/waitlist/join",{ email }).then((r)=>r.data),})}
The text was updated successfully, but these errors were encountered:
Right now all of the custom argument types that can be given to the
promiseFn
property are type of any.Meaning when someone else tries to re-use your code, they can not know what types they should provide.
Example:
In this case, the type of
email
is ofany
Suggetion
It would be nice to have the option to provide the argument types of the
promiseFn
The text was updated successfully, but these errors were encountered: