UNPKG

@duncte123/obs-websocket-js

Version:
12 lines (11 loc) 599 B
import { Debugger } from 'debug'; /** * Disambiguates an "error" and formats it nicely for `debug` output. * Particularly useful when dealing with error response objects from obs-websocket, * which are not actual Error-type errors, but simply Objects. * * @param {Object} debug A `debug` instance. * @param {String} prefix A string to print in front of the formatted error. * @param {Object|Error} error An error of ambiguous type that you wish to log to `debug`. Can be an Error, Object, or String. */ export default function (debug: Debugger, prefix: string, error: any): void;