The type of the API request object
The type of the API response object
Optionalsignal?: AbortSignalAn AbortSignal used to cancel the request.
Aborting rejects the call with an SDKAbortError (its name is 'AbortError')
and cancels the underlying HTTP request, including while the SDK is waiting to retry
a rate-limited (429) response. Aborting a call that already completed has no effect.
To add a deadline, compose signals: AbortSignal.any([mine, AbortSignal.timeout(5000)]).
Keep only the latest search with createLatestRequest:
const latestSearch = createLatestRequest();
const search = await latestSearch.run((signal) => discoverPlaces({ query, signal }));
if (search.current) showResults(search.value);
OptionalvalidateRequest?: booleanWhether the SDK validates the request parameters against the expected schema before sending them.
They extend the global configuration with service-specific options such as request validation,
cancellation, and lifecycle event listeners. A value you pass overrides the global one for this
call only. A retry object overrides the global retry field by field, and retry: undefined
turns retrying off for this call.
The parameters every service call shares.