Comments (4)
Could you try something like:
if (participant.status === ('CONNECTED' as ParticipantStatus)) {
}
from comms-sdk-react-native.
That would work but you'd loose type-safety that way, as this would be valid.
if (participant.type !== ("NONEXISTENTVALUE" as ParticipantStatus)) {
}
Just for the record, this isn't a big issue for us as we can use the string literal.
if (participant.status === 'CONNECTED') {
}
The issue is that it conflicts with one of our eslint-rules that we have configured https://typescript-eslint.io/rules/no-unsafe-enum-comparison/ .
It also removes some of the type-safety that would normally come with using an enum in our linting setup
from comms-sdk-react-native.
We are working on this, and we hope to provide a solution in a coming beta version.
from comms-sdk-react-native.
Should be fixed in 3.8.1-beta.3 which is released now. Please note that for beta.3 enums and models need to be imported from the models "module". Eg. import { ParticipantStatus } from '@dolbyio/comms-sdk-react-native/models'
.
from comms-sdk-react-native.
Related Issues (20)
- Review return type for cancel method in Audio preview
- Clean up `Join conference screen`
- Incorrect return type of AudioPreview.stop() method
- Investigate use of expo flow
- In conference screen create a show drawer button
- In conference screen remove the name list
- In conference screen move buttons to the bottom
- In the example app navigation should driven by and enum or state pattern
- Investigate warning Excessive number of pending callbacks... HOT 1
- Move the "Test buttons" button to the bottom of the screen
- Add `Mixer_Mix` on `ParticipantType in Android + RN.
- Add the `ListenType` enum and implement the listenType accessors in Android + RN
- Add `setAllParticipantsVolume()` for Android + RN
- Add `setAllParticipantsVolume()` for iOS
- Add `setVolume(p: Participant)` for Android + RN
- Add `setVolume(p: Participant)` for iOS
- Add `setVolume(s: Stream)` for Android + RN
- Add `setVolume(s: Stream)` for iOS
- Add the `ListenType` enum and implement the listenType accessors in iOS
- Add `Mixer_Mix` on `ParticipantType in iOS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from comms-sdk-react-native.