You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the documentation when getting the GetRecordingStatus, if OBS is recording both recordTimecode and recordingFilename properties should be populated. With the current type definition the both properties can be undefined and throw a type error, see the following snippet of code.
importOBSWebSocketfrom"obs-websocket-js";constobs=newOBSWebSocket();obs.send("GetRecordingStatus").then(status=>{if(status.isRecording){// TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.// Type 'undefined' is not assignable to type 'string'.fnWithMandatoryString(status.recordingFilename);}})functionfnWithMandatoryString(someString: string){// whatever}
Versions Used (if applicable):
obs-websocket-js version: 4.0.3
node version: 14.18.1
typescript version: 4.5.4
The text was updated successfully, but these errors were encountered:
Description:
Hi,
According to the documentation when getting the
GetRecordingStatus
, if OBS is recording bothrecordTimecode
andrecordingFilename
properties should be populated. With the current type definition the both properties can be undefined and throw a type error, see the following snippet of code.Versions Used (if applicable):
4.0.3
14.18.1
4.5.4
The text was updated successfully, but these errors were encountered: