-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
AuthContext.tsx type definition is not compiling #5335
Comments
I cannot reproduce the problem in master. Maybe the problem was fixed since the latest beta, or maybe you are having mixed dependencies (e.g. ra-core on an older version than react-admin). Could you please create a CodeSandbox / repo reproducing the issue? |
Trying to track down the issue. I deleted yarn.lock and node_modules and did a fresh install, having the same issue:
Let me see if I can get a repo goin. |
I can't reproduce the problem, maybe it's a matter of TypeScript version. How are you compiling the react-admin code? Anyway, my TypeScript compilation should fail like yours, so I'm pushing a change... blindly. |
What you were expecting:
/ra-core/src/auth/AuthContext.tsx
to be compilableWhat happened instead:
Looks like
defaultProvider
is being instantiated withgetIdentity: () => Promise.resolve(defaultIdentity),
which hasid: null
. But the type definition forAuthProvider
has aUserIdentity
object which requires anid: Identifier
.Environment
The text was updated successfully, but these errors were encountered: