Interface RequestInterface<D>

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

Type Parameters

  • D extends object = object

Properties

Properties

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

Returns a new request with updated route and parameters

Type declaration

endpoint: EndpointInterface<D>