Interface Config<T>

interface Config<T> {
    abort?: any;
    data?: Document | BodyInit;
    dump: ((data) => string);
    events?: {
        [key: string]: (() => void);
    };
    headers: {
        [key: string]: string;
    };
    load: ((str) => T);
    method: keyof Methods;
    params?: string | Record<string, string> | URLSearchParams | string[][];
    promise: ((fn) => Promise<unknown>);
    raw?: boolean;
    url?: string;
    withCredentials: boolean;
    xmlHttpRequest: (() => XMLHttpRequest);
}

Type Parameters

  • T = unknown

Properties

abort?: any
data?: Document | BodyInit
dump: ((data) => string)

Type declaration

    • (data): string
    • Parameters

      • data: T

      Returns string

events?: {
    [key: string]: (() => void);
}

Type declaration

  • [key: string]: (() => void)
      • (): void
      • Returns void

headers: {
    [key: string]: string;
}

Type declaration

  • [key: string]: string
load: ((str) => T)

Type declaration

    • (str): T
    • Parameters

      • str: string

      Returns T

method: keyof Methods
params?: string | Record<string, string> | URLSearchParams | string[][]
promise: ((fn) => Promise<unknown>)

Type declaration

    • (fn): Promise<unknown>
    • Parameters

      • fn: (() => Promise<unknown>)
          • (): Promise<unknown>
          • Returns Promise<unknown>

      Returns Promise<unknown>

raw?: boolean
url?: string
withCredentials: boolean
xmlHttpRequest: (() => XMLHttpRequest)

Type declaration

    • (): XMLHttpRequest
    • Returns XMLHttpRequest