Type guard to check if a frame is an error response.
Value to check
True if the value is an error ResponseFrame
const data = JSON.parse(someJson);if (isErrorResponse(data)) { console.log("Error:", data.error); // TypeScript knows it's an error} Copy
const data = JSON.parse(someJson);if (isErrorResponse(data)) { console.log("Error:", data.error); // TypeScript knows it's an error}
Type guard to check if a frame is an error response.