Interface RequestInterface<D>

interface RequestInterface<D> {
    defaults: (<O>(newDefaults: O) => RequestInterface<D & O>);
    endpoint: EndpointInterface<D>;
    <T, O>(options: O & {
        method?: string;
    } & ("url" extends keyof D
        ? {
            url?: string;
        }
        : {
            url: string;
        })): Promise<OctokitResponse<T, number>>;
    <R>(route: (keyof Endpoints) | R, options?: R extends keyof Endpoints
        ? Endpoints[R<R>]["parameters"] & RequestParameters
        : RequestParameters): R extends keyof Endpoints
        ? Promise<Endpoints[R<R>]["response"]>
        : Promise<OctokitResponse<any, number>>;
}

Type Parameters

  • D extends object = object

Properties

Properties

defaults: (<O>(newDefaults: O) => RequestInterface<D & O>)

Returns a new request with updated route and parameters

endpoint: EndpointInterface<D>