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
The TypeScript definition for EventHandlersDataMap does not include a key for error, resulting in Visual Studio Code showing an error on this statement:
obs.on("error", (err) => {
console.log(err);
});
The error:
Argument of type '"error"' is not assignable to parameter of type '"ConnectionOpened" | "ConnectionClosed" | "AuthenticationSuccess" | "AuthenticationFailure" | "SwitchScenes" | "ScenesChanged" | "SceneCollectionChanged" | "SceneCollectionListChanged" | ... 43 more ... | "StudioModeSwitched"'.
I think that just adding error: Error; to EventHandlersDataMap in index.d.ts should resolve it, but am not familiar enough with TS to know if that actually is a valid solution.
Versions Used (if applicable):
obs-websocket-js version: v4.0.1
obs-websocket plugin version: n/a
obs-studio version: n/a
node version: v14.3.0
The text was updated successfully, but these errors were encountered:
czenker
added a commit
to czenker/obs-websocket-js
that referenced
this issue
Nov 21, 2020
Description:
The TypeScript definition for
EventHandlersDataMap
does not include a key forerror
, resulting in Visual Studio Code showing an error on this statement:The error:
I think that just adding
error: Error;
toEventHandlersDataMap
in index.d.ts should resolve it, but am not familiar enough with TS to know if that actually is a valid solution.Versions Used (if applicable):
The text was updated successfully, but these errors were encountered: