-
Notifications
You must be signed in to change notification settings - Fork 57
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
[v3] Return to a single enum for channel modes #1954
Labels
breaking
Backwards incompatible changes made to the public API.
Comments
lawrence-forooghian
added a commit
that referenced
this issue
Jan 21, 2025
For some reason, this property returns lowercased values. So, reflect this in the typings. This is the only non-breaking change we can make, since: - if we change the return value of RealtimeChannel.modes to be uppercase, that will break things for users who are checking this return value against a list of lowercase values (having previously observed that this property returns lowercase values even though it contradicts the typings) - if we change the ChannelModes type to be lowercase, then we break things for TypeScript users who are setting `modes` in their channel options I have also changed the ChannelModes type to indicate that it accepts lowercased values; this allows a user to pass a ResolvedChannelModes when setting `modes` in their channel options. In our next major release, we should remove this duplicate type and only allow a single case (probably lowercase, since that's what we use for all of the other enum values in this SDK). Have created #1954 for this.
lawrence-forooghian
added a commit
that referenced
this issue
Jan 21, 2025
For some reason, this property returns lowercased values. So, reflect this in the typings. This is the only non-breaking change we can make, since: - if we change the return value of RealtimeChannel.modes to be uppercase, that will break things for users who are checking this return value against a list of lowercase values (having previously observed that this property returns lowercase values even though it contradicts the typings) - if we change the ChannelModes type to be lowercase, then we break things for TypeScript users who are setting `modes` in their channel options I have also changed the ChannelModes type to indicate that it accepts lowercased values; this allows a user to pass a ResolvedChannelModes when setting `modes` in their channel options. In our next major release, we should remove this duplicate type and only allow a single case (probably lowercase, since that's what we use for all of the other enum values in this SDK). Have created #1954 for this. Resolves #1952.
lawrence-forooghian
added a commit
that referenced
this issue
Jan 22, 2025
For some reason, this property returns lowercased values. So, reflect this in the typings. This is the only non-breaking change we can make, since: - if we change the return value of RealtimeChannel.modes to be uppercase, that will break things for users who are checking this return value against a list of lowercase values (having previously observed that this property returns lowercase values even though it contradicts the typings) - if we change the ChannelModes type to be lowercase, then we break things for TypeScript users who are setting `modes` in their channel options I have also changed the ChannelModes type to indicate that it accepts lowercased values; this allows a user to pass a ResolvedChannelModes when setting `modes` in their channel options. In our next major release, we should remove this duplicate type and only allow a single case (probably lowercase, since that's what we use for all of the other enum values in this SDK). Have created #1954 for this. Resolves #1952.
lawrence-forooghian
added a commit
that referenced
this issue
Jan 27, 2025
For some reason, this property returns lowercased values. So, reflect this in the typings. This is the only non-breaking change we can make, since: - if we change the return value of RealtimeChannel.modes to be uppercase, that will break things for users who are checking this return value against a list of lowercase values (having previously observed that this property returns lowercase values even though it contradicts the typings) - if we change the ChannelModes type to be lowercase, then we break things for TypeScript users who are setting `modes` in their channel options I have also changed the ChannelModes type to indicate that it accepts lowercased values; this allows a user to pass a ResolvedChannelModes when setting `modes` in their channel options. In our next major release, we should remove this duplicate type and only allow a single case (probably lowercase, since that's what we use for all of the other enum values in this SDK). Have created #1954 for this. Resolves #1952.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Split from #1952.
From #1955:
If we choose lowercase we need to update the ably.com documentation, which uses uppercase: https://ably.com/docs/channels/options#modes
┆Issue is synchronized with this Jira Task by Unito
The text was updated successfully, but these errors were encountered: