Skip to content

Commit

Permalink
Revert "fix(RequestInterface): restore catch all overload"
Browse files Browse the repository at this point in the history
This reverts commit b488f9c.
  • Loading branch information
kachick committed Jun 28, 2022
1 parent b488f9c commit 5ef5f42
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/RequestInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,7 @@ export interface RequestInterface<D extends object = object> {
* @param {string} route Request method + URL. Example: `'GET /orgs/{org}'`
* @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
*/
<R extends Route>(
route: keyof Endpoints | R,
options?: R extends keyof Endpoints
? Endpoints[R]["parameters"] & RequestParameters
: RequestParameters
): R extends keyof Endpoints
? Promise<Endpoints[R]["response"]>
: Promise<OctokitResponse<any>>;
(route: Route, options?: RequestParameters): Promise<OctokitResponse<any>>;

/**
* Returns a new `request` with updated route and parameters
Expand Down

0 comments on commit 5ef5f42

Please sign in to comment.