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

Better compatibility with custom AuthProviders #5463

Open
wants to merge 6 commits into
base: 3.x
Choose a base branch
from

Conversation

leoafarias
Copy link

There are some cases with custom AuthProvider that might choose to return something on the promise.
You can see an example here:
https://github.com/benwinding/react-admin-firebase/blob/master/src/providers/AuthProvider.ts#L198

By returning void, it makes these providers incompatible and display type errors.

Copy link
Contributor

@djhi djhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :)

packages/ra-core/src/types.ts Outdated Show resolved Hide resolved
@fzaninotto
Copy link
Member

TypeScript doesn't seem to like your changes...

@leoafarias
Copy link
Author

TypeScript doesn't seem to like your changes...

Yes, that is the reason why my initial commit did not have a generic.

@fzaninotto fzaninotto changed the base branch from master to 3.x April 12, 2022 16:44
@fzaninotto fzaninotto added the v3 label Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants