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

submitUserMessage has any type in chat-panel.tsx #317

Open
alexfarrill opened this issue Apr 26, 2024 · 0 comments
Open

submitUserMessage has any type in chat-panel.tsx #317

alexfarrill opened this issue Apr 26, 2024 · 0 comments

Comments

@alexfarrill
Copy link

I noticed that submitUserMessage has an any type after it gets exported through the createAI function in actions.tsx instead of its original type signature.

I noticed because it caused a bug in my application where I was calling submitUserMessage with the wrong number of arguments, since I unknowingly had no type checking against the actual function signature of submitUserMessage.

Is this behavior intentional, a known limitation, or a bug?

If it's possible to get the signature out the other end or even to get by passing the type to useActions as a type parameter, I think that would be an improvement.

Thanks for taking a look!

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

No branches or pull requests

1 participant