Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix typings for RealtimeChannel.modes
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.
- Loading branch information