Type guard to check if a JSBridge response is a redirect (status code 302).
The JSBridge response to check
True if the response is a redirect (302), false otherwise
const response = await someBridgeMethod();if (isRedirection(response)) { // response is narrowed to BridgeRedirection console.log('Redirecting...');} Copy
const response = await someBridgeMethod();if (isRedirection(response)) { // response is narrowed to BridgeRedirection console.log('Redirecting...');}
Type guard to check if a JSBridge response is a redirect (status code 302).