Quartz Headless docs/createLatestRequest

Search documentation

Type to search the documentation.

API: Primitives

createLatestRequest

Stale-response guard for consumer-owned searches.

Overview

Stale-response guard for consumer-owned searches. Quartz cannot cancel network work it does not start, so the consumer starts it through run(): pass the provided signal to fetch and only the latest request can ever resolve with a value. Must be called in an injection context; the in-flight request is aborted on destroy.

Signature

function createLatestRequest(): LatestRequest

Returns LatestRequest