Skip to content

feat(chat/web): add explicit ChatButtonEntry interface and return typ…#16937

Open
nitin-kumar-code wants to merge 1 commit intojitsi:masterfrom
nitin-kumar-code:fix/chat-hook-types-web
Open

feat(chat/web): add explicit ChatButtonEntry interface and return typ…#16937
nitin-kumar-code wants to merge 1 commit intojitsi:masterfrom
nitin-kumar-code:fix/chat-hook-types-web

Conversation

@nitin-kumar-code
Copy link

Summary:
Add explicit TypeScript types to useChatButton in react/features/chat/hooks.web.ts to improve type safety and maintainability.

Changes:

  • Introduced ChatButtonEntry interface.
  • Typed the chat constant as ChatButtonEntry.
  • Added explicit return type ChatButtonEntry | undefined to useChatButton.
  • No functional changes.

Rationale:

  • Makes the hook contract explicit.
  • Improves IDE autocomplete and static analysis.
  • Prevents accidental structural changes to the chat entry object.
  • Keeps behaviour identical (type-only improvement).

Impact:

  • Web-only.
  • No runtime changes.
  • No UI changes.
  • No breaking changes.

@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

@nitin-kumar-code
Copy link
Author

Hi, thank you for the reminder.
I have signed the Individual CLA. Please let me know if there are any further steps required from my side.
Looking forward to the review.

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