Skip to content

Type Alias: SendRequestOptions<T> ​

ts
type SendRequestOptions<T> = z.infer<typeof sendRequestOptionsSchema> & object;

Defined in: src/core/schemas/sendRequestOptions.ts:25

Type Declaration ​

schema? ​

ts
optional schema?: z.ZodType<T>;

signal? ​

ts
optional signal?: AbortSignal;

Aborts the request, and any retry back-off it is waiting out.

Declared on the type rather than in the schema above: z.custom<AbortSignal>(v => v instanceof AbortSignal) is wrong the moment a signal crosses a realm — jsdom, undici and a worker each have their own constructor — and nothing here parses these options at runtime anyway.

Type Parameters ​

Type ParameterDefault type
Tunknown