Skip to main content
Version: 1.x.x

CommandCurrentType


import { CommandCurrentType } from "@hyper-fetch/core"

Description

Defined in command/command.types.ts:168

Preview

type CommandCurrentType<ResponseType,RequestDataType,QueryParamsType,ErrorType,GenericEndpoint,ClientOptions,MappedData> = { data?: CommandData<RequestDataType, MappedData>; headers?: HeadersInit; mockCallback?: (data: RequestDataType) => ClientResponseType<ResponseType, ErrorType>; params?: ExtractRouteParams<GenericEndpoint> | NegativeTypes; queryParams?: QueryParamsType | NegativeTypes; updatedAbortKey?: boolean; updatedCacheKey?: boolean; updatedEffectKey?: boolean; updatedQueueKey?: boolean; used?: boolean } & Partial<NullableKeys<CommandConfig<GenericEndpoint, ClientOptions>>>;

Structure

{
data: MappedData extends undefined ? RequestDataType : MappedData | \null\ | \undefined\;
headers: HeadersInit;
mockCallback: (data: RequestDataType) => ClientResponseType<ResponseType, ErrorType>;
params: string extends T ? NegativeTypes : (T extends `${string}:,${infer Param}/,${infer Rest}` ? [k in \Param\ | \keyof ExtractRouteParams<Rest>\]: ParamType : (T extends `${string}:,${infer Param}` ? [k in Param]: ParamType : NegativeTypes)) | \null\ | \undefined\;
queryParams: QueryParamsType | \null\ | \undefined\;
updatedAbortKey: boolean;
updatedCacheKey: boolean;
updatedEffectKey: boolean;
updatedQueueKey: boolean;
used: boolean;
...params2: Partial<NullableKeys<CommandConfig<GenericEndpoint, ClientOptions>>>;
}