Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve authenticate overload return type #235

Merged
merged 1 commit into from
Jul 12, 2023
Merged

Improve authenticate overload return type #235

merged 1 commit into from
Jul 12, 2023

Conversation

aaronadamsCA
Copy link
Contributor

@typescript-eslint/await-thenable doesn't like the new overload signature from #211. When I upgrade remix-auth to v3.5.0, it tells me to remove await from this line:

await authenticator.authenticate("auth0", request, { successRedirect });
Unexpected `await` of a non-Promise (non-"Thenable") value  @typescript-eslint/await-thenable

If authenticate() implementations are expected to be async, then they will always return promises, so Promise<never> would be the correct return type. Just a minor dev experience fix.

@sergiodxa sergiodxa added the bug Something isn't working label Jul 12, 2023
@sergiodxa sergiodxa merged commit 2233a09 into sergiodxa:main Jul 12, 2023
@arempe93
Copy link

@sergiodxa is it possible to get a patch release for this? I'm also running into this issue

@sergiodxa
Copy link
Owner

Published as v3.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants