PokéRogue
    Preparing search index...

    Interface DoFetchConfigInternal

    Configuration type for ApiBase.doFetch.

    interface DoFetchConfig {
        body?:
            | string
            | {
                locked: boolean;
                "[asyncIterator]"(
                    options?: ReadableStreamIteratorOptions,
                ): ReadableStreamAsyncIterator<any>;
                cancel(reason?: any): Promise<void>;
                getReader(options: { mode: "byob" }): ReadableStreamBYOBReader;
                getReader(): ReadableStreamDefaultReader<any>;
                getReader(
                    options?: ReadableStreamGetReaderOptions,
                ): ReadableStreamReader<any>;
                pipeThrough<T>(
                    transform: ReadableWritablePair<T, any>,
                    options?: StreamPipeOptions,
                ): ReadableStream<T>;
                pipeTo(
                    destination: WritableStream<any>,
                    options?: StreamPipeOptions,
                ): Promise<void>;
                tee(): [ReadableStream<any>, ReadableStream<any>];
                values(
                    options?: ReadableStreamIteratorOptions,
                ): ReadableStreamAsyncIterator<any>;
            }
            | ReadonlyMap<string, string | null>
            | {
                size: number;
                type: string;
                arrayBuffer(): Promise<ArrayBuffer>;
                bytes(): Promise<Uint8Array<ArrayBuffer>>;
                slice(start?: number, end?: number, contentType?: string): Blob;
                stream(): ReadableStream<Uint8Array<ArrayBuffer>>;
                text(): Promise<string>;
            }
            | {
                "[toStringTag]": "ArrayBuffer";
                byteLength: number;
                slice(begin?: number, end?: number): ArrayBuffer;
            }
            | {
                buffer: {
                    "[toStringTag]": "ArrayBuffer";
                    byteLength: number;
                    slice(begin?: number, end?: number): ArrayBuffer;
                };
                byteLength: number;
                byteOffset: number;
            }
            | {
                "[iterator]"(): FormDataIterator<[string, FormDataEntryValue]>;
                append(name: string, value: string | Blob): void;
                append(name: string, value: string): void;
                append(name: string, blobValue: Blob, filename?: string): void;
                delete(name: string): void;
                entries(): FormDataIterator<[string, FormDataEntryValue]>;
                forEach(
                    callbackfn: (
                        value: FormDataEntryValue,
                        key: string,
                        parent: FormData,
                    ) => void,
                    thisArg?: any,
                ): void;
                get(name: string): FormDataEntryValue | null;
                getAll(name: string): FormDataEntryValue[];
                has(name: string): boolean;
                keys(): FormDataIterator<string>;
                set(name: string, value: string | Blob): void;
                set(name: string, value: string): void;
                set(name: string, blobValue: Blob, filename?: string): void;
                values(): FormDataIterator<FormDataEntryValue>;
            }
            | null;
        cache?: RequestCache;
        credentials?: RequestCredentials;
        headers?: | { [key: string]: string }
        | [string, string][]
        | {
            "[iterator]"(): HeadersIterator<[string, string]>;
            append(name: string, value: string): void;
            delete(name: string): void;
            entries(): HeadersIterator<[string, string]>;
            forEach(
                callbackfn: (value: string, key: string, parent: Headers) => void,
                thisArg?: any,
            ): void;
            get(name: string): string | null;
            getSetCookie(): string[];
            has(name: string): boolean;
            keys(): HeadersIterator<string>;
            set(name: string, value: string): void;
            values(): HeadersIterator<string>;
        };
        integrity?: string;
        keepalive?: boolean;
        method: string
        | undefined;
        mode?: RequestMode;
        priority?: RequestPriority;
        redirect?: RequestRedirect;
        referrer?: string;
        referrerPolicy?: ReferrerPolicy;
        signal?:
            | {
                aborted: boolean;
                onabort: ((this: AbortSignal, ev: Event) => any)
                | null;
                reason: any;
                addEventListener<K extends "abort">(
                    type: K,
                    listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any,
                    options?: boolean | AddEventListenerOptions,
                ): void;
                addEventListener(
                    type: string,
                    listener: EventListenerOrEventListenerObject,
                    options?: boolean | AddEventListenerOptions,
                ): void;
                dispatchEvent(event: Event): boolean;
                removeEventListener<K extends "abort">(
                    type: K,
                    listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any,
                    options?: boolean | EventListenerOptions,
                ): void;
                removeEventListener(
                    type: string,
                    listener: EventListenerOrEventListenerObject,
                    options?: boolean | EventListenerOptions,
                ): void;
                throwIfAborted(): void;
            }
            | null;
        window?: null;
    }

    Hierarchy (View Summary)

    Index

    Properties

    body?:
        | string
        | {
            locked: boolean;
            "[asyncIterator]"(
                options?: ReadableStreamIteratorOptions,
            ): ReadableStreamAsyncIterator<any>;
            cancel(reason?: any): Promise<void>;
            getReader(options: { mode: "byob" }): ReadableStreamBYOBReader;
            getReader(): ReadableStreamDefaultReader<any>;
            getReader(
                options?: ReadableStreamGetReaderOptions,
            ): ReadableStreamReader<any>;
            pipeThrough<T>(
                transform: ReadableWritablePair<T, any>,
                options?: StreamPipeOptions,
            ): ReadableStream<T>;
            pipeTo(
                destination: WritableStream<any>,
                options?: StreamPipeOptions,
            ): Promise<void>;
            tee(): [ReadableStream<any>, ReadableStream<any>];
            values(
                options?: ReadableStreamIteratorOptions,
            ): ReadableStreamAsyncIterator<any>;
        }
        | ReadonlyMap<string, string | null>
        | {
            size: number;
            type: string;
            arrayBuffer(): Promise<ArrayBuffer>;
            bytes(): Promise<Uint8Array<ArrayBuffer>>;
            slice(start?: number, end?: number, contentType?: string): Blob;
            stream(): ReadableStream<Uint8Array<ArrayBuffer>>;
            text(): Promise<string>;
        }
        | {
            "[toStringTag]": "ArrayBuffer";
            byteLength: number;
            slice(begin?: number, end?: number): ArrayBuffer;
        }
        | {
            buffer: {
                "[toStringTag]": "ArrayBuffer";
                byteLength: number;
                slice(begin?: number, end?: number): ArrayBuffer;
            };
            byteLength: number;
            byteOffset: number;
        }
        | {
            "[iterator]"(): FormDataIterator<[string, FormDataEntryValue]>;
            append(name: string, value: string | Blob): void;
            append(name: string, value: string): void;
            append(name: string, blobValue: Blob, filename?: string): void;
            delete(name: string): void;
            entries(): FormDataIterator<[string, FormDataEntryValue]>;
            forEach(
                callbackfn: (
                    value: FormDataEntryValue,
                    key: string,
                    parent: FormData,
                ) => void,
                thisArg?: any,
            ): void;
            get(name: string): FormDataEntryValue | null;
            getAll(name: string): FormDataEntryValue[];
            has(name: string): boolean;
            keys(): FormDataIterator<string>;
            set(name: string, value: string | Blob): void;
            set(name: string, value: string): void;
            set(name: string, blobValue: Blob, filename?: string): void;
            values(): FormDataIterator<FormDataEntryValue>;
        }
        | null

    A BodyInit object or null to set request's body.

    Type Declaration

    • string
    • {
          locked: boolean;
          "[asyncIterator]"(
              options?: ReadableStreamIteratorOptions,
          ): ReadableStreamAsyncIterator<any>;
          cancel(reason?: any): Promise<void>;
          getReader(options: { mode: "byob" }): ReadableStreamBYOBReader;
          getReader(): ReadableStreamDefaultReader<any>;
          getReader(
              options?: ReadableStreamGetReaderOptions,
          ): ReadableStreamReader<any>;
          pipeThrough<T>(
              transform: ReadableWritablePair<T, any>,
              options?: StreamPipeOptions,
          ): ReadableStream<T>;
          pipeTo(
              destination: WritableStream<any>,
              options?: StreamPipeOptions,
          ): Promise<void>;
          tee(): [ReadableStream<any>, ReadableStream<any>];
          values(
              options?: ReadableStreamIteratorOptions,
          ): ReadableStreamAsyncIterator<any>;
      }
    • ReadonlyMap<string, string | null>
    • {
          size: number;
          type: string;
          arrayBuffer(): Promise<ArrayBuffer>;
          bytes(): Promise<Uint8Array<ArrayBuffer>>;
          slice(start?: number, end?: number, contentType?: string): Blob;
          stream(): ReadableStream<Uint8Array<ArrayBuffer>>;
          text(): Promise<string>;
      }
      • Readonlysize: number

        The size read-only property of the Blob interface returns the size of the Blob or File in bytes.

        MDN Reference

      • Readonlytype: string

        The type read-only property of the Blob interface returns the MIME type of the file.

        MDN Reference

      • arrayBuffer: function
        • The arrayBuffer() method of the Blob interface returns a Promise that resolves with the contents of the blob as binary data contained in an ArrayBuffer.

          MDN Reference

          Returns Promise<ArrayBuffer>

      • bytes: function
      • slice: function
        • The slice() method of the Blob interface creates and returns a new Blob object which contains data from a subset of the blob on which it's called.

          MDN Reference

          Parameters

          • Optionalstart: number
          • Optionalend: number
          • OptionalcontentType: string

          Returns Blob

      • stream: function
      • text: function
        • The text() method of the Blob interface returns a Promise that resolves with a string containing the contents of the blob, interpreted as UTF-8.

          MDN Reference

          Returns Promise<string>

    • {
          "[toStringTag]": "ArrayBuffer";
          byteLength: number;
          slice(begin?: number, end?: number): ArrayBuffer;
      }
      • Readonly[toStringTag]: "ArrayBuffer"
      • ReadonlybyteLength: number

        Read-only. The length of the ArrayBuffer (in bytes).

      • slice: function
        • Returns a section of an ArrayBuffer.

          Parameters

          • Optionalbegin: number
          • Optionalend: number

          Returns ArrayBuffer

    • {
          buffer: {
              "[toStringTag]": "ArrayBuffer";
              byteLength: number;
              slice(begin?: number, end?: number): ArrayBuffer;
          };
          byteLength: number;
          byteOffset: number;
      }
      • Readonlybuffer: {
            "[toStringTag]": "ArrayBuffer";
            byteLength: number;
            slice(begin?: number, end?: number): ArrayBuffer;
        }

        The ArrayBuffer instance referenced by the array.

        • Readonly[toStringTag]: "ArrayBuffer"
        • ReadonlybyteLength: number

          Read-only. The length of the ArrayBuffer (in bytes).

        • slice: function
          • Returns a section of an ArrayBuffer.

            Parameters

            • Optionalbegin: number
            • Optionalend: number

            Returns ArrayBuffer

      • ReadonlybyteLength: number

        The length in bytes of the array.

      • ReadonlybyteOffset: number

        The offset in bytes of the array.

    • {
          "[iterator]"(): FormDataIterator<[string, FormDataEntryValue]>;
          append(name: string, value: string | Blob): void;
          append(name: string, value: string): void;
          append(name: string, blobValue: Blob, filename?: string): void;
          delete(name: string): void;
          entries(): FormDataIterator<[string, FormDataEntryValue]>;
          forEach(
              callbackfn: (
                  value: FormDataEntryValue,
                  key: string,
                  parent: FormData,
              ) => void,
              thisArg?: any,
          ): void;
          get(name: string): FormDataEntryValue | null;
          getAll(name: string): FormDataEntryValue[];
          has(name: string): boolean;
          keys(): FormDataIterator<string>;
          set(name: string, value: string | Blob): void;
          set(name: string, value: string): void;
          set(name: string, blobValue: Blob, filename?: string): void;
          values(): FormDataIterator<FormDataEntryValue>;
      }
      • [iterator]: function
      • append: function
        • The append() method of the FormData interface appends a new value onto an existing key inside a FormData object, or adds the key if it does not already exist.

          MDN Reference

          Parameters

          • name: string
          • value: string | Blob

          Returns void

        • Parameters

          • name: string
          • value: string

          Returns void

        • Parameters

          • name: string
          • blobValue: Blob
          • Optionalfilename: string

          Returns void

      • delete: function
        • The delete() method of the FormData interface deletes a key and its value(s) from a FormData object.

          MDN Reference

          Parameters

          • name: string

          Returns void

      • entries: function
      • forEach: function
        • Parameters

          Returns void

      • get: function
        • The get() method of the FormData interface returns the first value associated with a given key from within a FormData object. If you expect multiple values and want all of them, use the getAll() method instead.

          MDN Reference

          Parameters

          • name: string

          Returns FormDataEntryValue | null

      • getAll: function
        • The getAll() method of the FormData interface returns all the values associated with a given key from within a FormData object.

          MDN Reference

          Parameters

          • name: string

          Returns FormDataEntryValue[]

      • has: function
        • The has() method of the FormData interface returns whether a FormData object contains a certain key.

          MDN Reference

          Parameters

          • name: string

          Returns boolean

      • keys: function
        • Returns a list of keys in the list.

          Returns FormDataIterator<string>

      • set: function
        • The set() method of the FormData interface sets a new value for an existing key inside a FormData object, or adds the key/value if it does not already exist.

          MDN Reference

          Parameters

          • name: string
          • value: string | Blob

          Returns void

        • Parameters

          • name: string
          • value: string

          Returns void

        • Parameters

          • name: string
          • blobValue: Blob
          • Optionalfilename: string

          Returns void

      • values: function
    • null
    cache?: RequestCache

    A string indicating how the request will interact with the browser's cache to set request's cache.

    credentials?: RequestCredentials

    A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials.

    headers?:
        | { [key: string]: string }
        | [string, string][]
        | {
            "[iterator]"(): HeadersIterator<[string, string]>;
            append(name: string, value: string): void;
            delete(name: string): void;
            entries(): HeadersIterator<[string, string]>;
            forEach(
                callbackfn: (value: string, key: string, parent: Headers) => void,
                thisArg?: any,
            ): void;
            get(name: string): string | null;
            getSetCookie(): string[];
            has(name: string): boolean;
            keys(): HeadersIterator<string>;
            set(name: string, value: string): void;
            values(): HeadersIterator<string>;
        }

    A Headers object, an object literal, or an array of two-item arrays to set request's headers.

    Type Declaration

    • { [key: string]: string }
    • [string, string][]
    • {
          "[iterator]"(): HeadersIterator<[string, string]>;
          append(name: string, value: string): void;
          delete(name: string): void;
          entries(): HeadersIterator<[string, string]>;
          forEach(
              callbackfn: (value: string, key: string, parent: Headers) => void,
              thisArg?: any,
          ): void;
          get(name: string): string | null;
          getSetCookie(): string[];
          has(name: string): boolean;
          keys(): HeadersIterator<string>;
          set(name: string, value: string): void;
          values(): HeadersIterator<string>;
      }
      • [iterator]: function
        • Returns HeadersIterator<[string, string]>

      • append: function
        • The append() method of the Headers interface appends a new value onto an existing header inside a Headers object, or adds the header if it does not already exist.

          MDN Reference

          Parameters

          • name: string
          • value: string

          Returns void

      • delete: function
        • The delete() method of the Headers interface deletes a header from the current Headers object.

          MDN Reference

          Parameters

          • name: string

          Returns void

      • entries: function
        • Returns an iterator allowing to go through all key/value pairs contained in this object.

          Returns HeadersIterator<[string, string]>

      • forEach: function
        • Parameters

          • callbackfn: (value: string, key: string, parent: Headers) => void
          • OptionalthisArg: any

          Returns void

      • get: function
        • The get() method of the Headers interface returns a byte string of all the values of a header within a Headers object with a given name. If the requested header doesn't exist in the Headers object, it returns null.

          MDN Reference

          Parameters

          • name: string

          Returns string | null

      • getSetCookie: function
        • The getSetCookie() method of the Headers interface returns an array containing the values of all Set-Cookie headers associated with a response. This allows Headers objects to handle having multiple Set-Cookie headers, which wasn't possible prior to its implementation.

          MDN Reference

          Returns string[]

      • has: function
        • The has() method of the Headers interface returns a boolean stating whether a Headers object contains a certain header.

          MDN Reference

          Parameters

          • name: string

          Returns boolean

      • keys: function
        • Returns an iterator allowing to go through all keys of the key/value pairs contained in this object.

          Returns HeadersIterator<string>

      • set: function
        • The set() method of the Headers interface sets a new value for an existing header inside a Headers object, or adds the header if it does not already exist.

          MDN Reference

          Parameters

          • name: string
          • value: string

          Returns void

      • values: function
        • Returns an iterator allowing to go through all values of the key/value pairs contained in this object.

          Returns HeadersIterator<string>

    integrity?: string

    A cryptographic hash of the resource to be fetched by request. Sets request's integrity.

    keepalive?: boolean

    A boolean to set request's keepalive.

    method: string | undefined

    A string to set request's method.

    A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode.

    priority?: RequestPriority
    redirect?: RequestRedirect

    A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect.

    referrer?: string

    A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer.

    referrerPolicy?: ReferrerPolicy

    A referrer policy to set request's referrerPolicy.

    signal?:
        | {
            aborted: boolean;
            onabort: ((this: AbortSignal, ev: Event) => any)
            | null;
            reason: any;
            addEventListener<K extends "abort">(
                type: K,
                listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any,
                options?: boolean | AddEventListenerOptions,
            ): void;
            addEventListener(
                type: string,
                listener: EventListenerOrEventListenerObject,
                options?: boolean | AddEventListenerOptions,
            ): void;
            dispatchEvent(event: Event): boolean;
            removeEventListener<K extends "abort">(
                type: K,
                listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any,
                options?: boolean | EventListenerOptions,
            ): void;
            removeEventListener(
                type: string,
                listener: EventListenerOrEventListenerObject,
                options?: boolean | EventListenerOptions,
            ): void;
            throwIfAborted(): void;
        }
        | null

    An AbortSignal to set request's signal.

    Type Declaration

    • {
          aborted: boolean;
          onabort: ((this: AbortSignal, ev: Event) => any) | null;
          reason: any;
          addEventListener<K extends "abort">(
              type: K,
              listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any,
              options?: boolean | AddEventListenerOptions,
          ): void;
          addEventListener(
              type: string,
              listener: EventListenerOrEventListenerObject,
              options?: boolean | AddEventListenerOptions,
          ): void;
          dispatchEvent(event: Event): boolean;
          removeEventListener<K extends "abort">(
              type: K,
              listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any,
              options?: boolean | EventListenerOptions,
          ): void;
          removeEventListener(
              type: string,
              listener: EventListenerOrEventListenerObject,
              options?: boolean | EventListenerOptions,
          ): void;
          throwIfAborted(): void;
      }
      • Readonlyaborted: boolean

        The aborted read-only property returns a value that indicates whether the asynchronous operations the signal is communicating with are aborted (true) or not (false).

        MDN Reference

      • onabort: ((this: AbortSignal, ev: Event) => any) | null
      • Readonlyreason: any

        The reason read-only property returns a JavaScript value that indicates the abort reason.

        MDN Reference

      • addEventListener: function
      • dispatchEvent: function
        • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().

          MDN Reference

          Parameters

          Returns boolean

      • removeEventListener: function
        • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.

          MDN Reference

          Type Parameters

          • K extends "abort"

          Parameters

          Returns void

        • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.

          MDN Reference

          Parameters

          Returns void

      • throwIfAborted: function
        • The throwIfAborted() method throws the signal's abort reason if the signal has been aborted; otherwise it does nothing.

          MDN Reference

          Returns void

    • null
    window?: null

    Can only be null. Used to disassociate request from any Window.