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

@azure/communication-chat: ChatMessageType should be a string literal union type #15276

Closed
JamesBurnside opened this issue May 13, 2021 · 4 comments · Fixed by #15703
Closed
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Communication

Comments

@JamesBurnside
Copy link
Member

  • Package Name: @azure/communication-chat
  • Package Version: 1.0.0
  • Operating system: Windows

Describe the bug
Currently ChatMessageType is just a string but it can actually only be a set of known, specific values. Having it as a string type means it does not provide any assurances to what its value could be.

Expected behavior
I would expect this to be a string literal union:

export type ChatMessageType = 'text' | 'html' | 'topicUpdated' | 'participantAdded' | 'participantRemoved';
@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 13, 2021
@ramya-rao-a ramya-rao-a added Client This issue points to a problem in the data-plane of the library. Communication labels May 14, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 14, 2021
@DominikMe
Copy link
Member

I agree with the issue

@LuChen-Microsoft & @juancamilor Do you see any reason why we wouldn't make that change?

@juancamilor
Copy link
Member

yup, I agree, thought it was implemented that way. This happens just in JS.
@LuChen-Microsoft could you add a defect in our backlog please?

@LuChen-Microsoft
Copy link
Member

#15703

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Communication
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants