`sendLoginLink` exported return type is wrong
sendLoginLink returns data, but the exported types says it returns void.
Would be great to properly type this function.
Thanks :)
Updated with @userfront/[email protected]
@tyrw The updated types do not seem to include possible errors. For example, if you try to login using the email [email protected] the response is:
{
error: "Bad Request"
message: "Email format is invalid"
statusCode: 400
}
which is not assignable to LinkResponse.
@moroshko Thanks for the follow up. We're on the fence about switching this library over to typescript (JS encourages readability and contributions from those that don't know TS). That said, it would be less prone to issues like this.
We'll try to add the error responses, and if it's starting to look hard to track, will make an issue to convert to TS so these things are all auto-generated.
Added to Linear, DEV-757