Skip to main content
Version: v7.0.0

FetchPayloadType

If the request data is not filled it will throw an error


Import
import { FetchPayloadType } from "@hyper-fetch/core"

Preview

type FetchPayloadType<Payload,HasPayload> = Payload extends EmptyTypes | void | never ? { payload?: EmptyTypes } : HasPayload extends true ? { payload?: EmptyTypes } : { payload: Payload };
On this page