Another issue was with the recent typings added on OTSessionProps, OTSubscriberProps and OTPublisherProps
Some methods were added onto the JS component, like OTSession#getCapabilities...
However, they are not in fact props.
The issue with those typings is that they force consumers of those three components, to fill in those props; despite the fact that they cannot be used anywhere in the component implementations.
The only reason they could be used was if a developer subclassed for example OTSession, and then called those props themselves.
Those methods are a part of the components, but using them actually requires subclassing said components. There is no practical way to use them otherwise.
Additionally; OTSession, OTPublisher and OTSubscriber should probably have those functions removed from the declared propTypes and defaultProps.
I can do that but I need confirmation before I perform that change.
In anycase, if possible this PR could be merged and published quickly in order to fix the typings which are completely broken at the moment.
Contributing checklist
Solves issue(s)
Fixes: https://github.com/opentok/opentok-react-native/issues/690
The typings file was broken. Essentially the basic fixes needed are along those lines:
Another issue was with the recent typings added on
OTSessionProps
,OTSubscriberProps
andOTPublisherProps
Some methods were added onto the JS component, like
OTSession#getCapabilities
... However, they are not in factprops
.The issue with those typings is that they force consumers of those three components, to fill in those props; despite the fact that they cannot be used anywhere in the component implementations. The only reason they could be used was if a developer subclassed for example
OTSession
, and then called those props themselves.Those methods are a part of the components, but using them actually requires subclassing said components. There is no practical way to use them otherwise.
Additionally;
OTSession
,OTPublisher
andOTSubscriber
should probably have those functions removed from the declaredpropTypes
anddefaultProps
.I can do that but I need confirmation before I perform that change.
In anycase, if possible this PR could be merged and published quickly in order to fix the typings which are completely broken at the moment.