Type guard to check if a JSBridge response is successful (2xx status codes).
The JSBridge response to check
True if the response is successful (200-299), false otherwise
const response = await someBridgeMethod();if (isSuccess(response)) { // response narrowed to success variants — result is available console.log(response.result);} Copy
const response = await someBridgeMethod();if (isSuccess(response)) { // response narrowed to success variants — result is available console.log(response.result);}
Type guard to check if a JSBridge response is successful (2xx status codes).