Skip to main content
Version: v8.0.0

DeliveryStrategyType

A custom delivery strategy. It is a factory invoked once per listen() call, so every subscription owns its own timers and buffers.

Input is the raw message type (the listener's response type), Output is what listen callbacks receive. Use createDeliveryStrategy to author one with full type inference.


Import
import { DeliveryStrategyType } from "@hyper-fetch/sockets"

Preview​

type DeliveryStrategyType<Input,Output,Extra> = (context: DeliveryStrategyContextType<Output, Extra>) => DeliveryControllerType<Input, Extra>;