@data-eden/networkFunctionshasPendingRequestshasPendingRequests CallablehasPendingRequests(originatingFetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>): booleanExposes a mechanism that can be used to know if all requests that have been started with a given buildFetch result have completed.@exampleimport { hasPendingRequests } from '@data-eden/network';import { fetch } from './my-app-buildFetch';console.log(hasPendingRequests(fetch)) // => false;let result = fetch('/some-url');console.log(hasPendingRequests(fetch)) // => true;await result;console.log(hasPendingRequests(fetch)) // => false;ParametersoriginatingFetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>Returns boolean
Exposes a mechanism that can be used to know if all requests that have been started with a given
buildFetch
result have completed.