-
Notifications
You must be signed in to change notification settings - Fork 125
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 onAdditionalDetails argument in CoreOptions #2536
Comments
Hey @dimitriBouteille . We are fixing all typescript interfaces/types for the new major version that will come in the upcoming weeks. This includes fixing the type of this callback as well. I will keep this ticket open until we release the new major version containing its fix. Cheers. |
@ribeiroguilherme - Could you also please provide examples of how to use this? Not sure if the example in the docs is correct: function handleOnAdditionalDetails(state, component) {
state.data // Provides the data that you must pass in the `/payments/details` call.
component // Provides the active component instance that called this event.
} TypeScript examples would be much appreciated as well |
Hey @ashrafnazar could you please share the Docs link? I will ask the team to fix this. I don't believe that adding a Typescript example would change something in this case. Ideally the types must be inferred by the IDE, and the logic is the same as Javascript code. For now, you can check the |
Hi @ribeiroguilherme - thanks for the reply. Here is the link. You'll have to scroll down a little bit. Having an example in the documentation (or at least links which point to them) would be beneficial. I still think having TS examples would be useful, as types cannot always be inferred. I haven't seen examples for the |
I reached out to the Docs team and we will fix the Can you elaborate what do you expect to see about |
@ribeiroguilherme - appreciate you reaching out. As I'm working on a Next.js app, an example on handling how to retrieve the So what I'm having to do is use React's Context API to retrieve the property from the initial API call and then pass it into |
The argument
state
isany
actuality forCoreOptions.onAdditionalDetails
:adyen-web/packages/lib/src/core/types.ts
Line 136 in 78bfdd5
Maybe add type for this argument, something like that :
The text was updated successfully, but these errors were encountered: