Skip to content

Conversation

@mschinis
Copy link

This is a quick fix to propagate the correct typescript definition, defined in CodeProviderOptions, to CodeUIOptions.

I would like to make a check during sendCode execution to check if the user is registered within our system. In order to do that, I tried returning CodeProviderError object from sendCode as defined in CodeProviderOptions, but I got a typescript error even though my implementation actually worked.

Upon further investigation, it seems that the two definitions of sendCode within CodeUI and CodeProvider are different.
Since the sendCode method is passed from CodeUI to CodeProvider, the two typescript definitions for the same method should match.

An alternative to this approach, and likely better, would be to update CodeUIOptions.sendCode definition to be the same as CodeProviderOptions["sendCode"]

Copy link

@mazterkaduula-ctrl mazterkaduula-ctrl left a comment

Choose a reason for hiding this comment

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

Copulet

@mschinis
Copy link
Author

@thdxr could I get a review on this please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants