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

Type error: Object literal may only specify known properties, and 'onError' does not exist in type 'IHandleIncomingRedirectOptions'. #3841

Open
michielbdejong opened this issue Jan 22, 2025 · 3 comments · May be fixed by #3842
Labels
bug Something isn't working

Comments

@michielbdejong
Copy link

michielbdejong commented Jan 22, 2025

I'm getting this error when trying to compile https://github.com/inrupt/solid-client-authn-js/blob/main/packages/browser/examples/single/bundle/src/App.js#L51 as TypeScript.
Is it missing from 'IHandleIncomingRedirectOptions'?

@michielbdejong michielbdejong added the bug Something isn't working label Jan 22, 2025
@michielbdejong
Copy link
Author

In JavaScript I can pass the onError option, but in TypeScript I have to omit it to avoid build errors.

@NSeydoux
Copy link
Contributor

Hi @michielbdejong , thanks for reporting this. It's actually the other way around: this is something that is not part of the function signature, and should not have been put in this code snippet. I'll remove it from there and update the snippet to the appropriate way to receive error events.

NSeydoux added a commit that referenced this issue Jan 23, 2025
Fixes #3841.

The browser demo no longer passes an incorrect argument (from a TS
perspective) to the `handleIncomingRedirect` function. This also fixes
how the React app root is created with respect to the latest upgrade.
@NSeydoux NSeydoux linked a pull request Jan 23, 2025 that will close this issue
@NSeydoux
Copy link
Contributor

It turns out there were a couple of cleanup tasks pending on this demo app, all fixed in #3842, so thanks for the nudge!

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 a pull request may close this issue.

2 participants