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

Typing of usePerformCardAction() hook is wrong #3968

Closed
compulim opened this issue Jun 29, 2021 · 0 comments · Fixed by #3969 or #4045
Closed

Typing of usePerformCardAction() hook is wrong #3968

compulim opened this issue Jun 29, 2021 · 0 comments · Fixed by #3969 or #4045

Comments

@compulim
Copy link
Contributor

Screenshots

Version

main (RC of 4.14.0)

Describe the bug

The typing for usePerformCardAction() is wrong. It should be:

usePerformCardAction(): (cardAction: DirectLineCardAction) => void

Instead of

usePerformCardAction(): ({
  cardAction: ...;
  getSignInUrl: ...;
  target: any;
}) => void

Steps to reproduce

Two ways to repro:

  • Fully type out the AdaptiveCardRenderer.tsx
  • Use the usePerformCardAction hook in any TypeScript projects

Expected behavior

It should pass type checking.

Additional context

[Bug]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant