INNER CODE UNIT · TypeScript
Promise
enisdenjo/graphql-sse · src/client.ts:310
await new Promise((resolve) =>
setTimeout(
resolve,
retryDelay +
// add random timeout from 300ms to 3s
Math.floor(Math.random() * (3000 - 300) + 300),
),
);
},
credentials = 'same-origin',
referrer,
referrerPolicy,
onMessage,
on: clientOn,
} = options;
const fetchFn = (options.fetchFn || fetch) as typeof fetch;
const AbortControllerImpl = (options.abortControllerImpl ||
AbortController) as typeof AbortController;