Skip to content
This repository has been archived by the owner on Dec 24, 2021. It is now read-only.

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Noel committed Feb 15, 2021
1 parent 21b4d88 commit 85714b7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 32 deletions.
10 changes: 9 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,20 @@ export { default as Serializer } from './structures/Serializer';
export { default as HttpError } from './errors/HttpError';
export { default as Response } from './structures/Response';

export * as middleware from './middleware';
export { RequestOptions, HttpClient, UrlLike, Request };
export * as middleware from './middleware';
export * from './serializers';

export interface SingleRequestOptions extends HttpClientOptions, Omit<RequestOptions, 'method'> {}

export declare function get(url: UrlLike | SingleRequestOptions, options?: Omit<SingleRequestOptions, 'url'>): Request;
export declare function put(url: UrlLike | SingleRequestOptions, options?: Omit<SingleRequestOptions, 'url'>): Request;
export declare function post(url: UrlLike | SingleRequestOptions, options?: Omit<SingleRequestOptions, 'url'>): Request;
export declare function patch(url: UrlLike | SingleRequestOptions, options?: Omit<SingleRequestOptions, 'url'>): Request;
export declare function trace(url: UrlLike | SingleRequestOptions, options?: Omit<SingleRequestOptions, 'url'>): Request;
export declare function options(url: UrlLike | SingleRequestOptions, options?: Omit<SingleRequestOptions, 'url'>): Request;
export declare function connect(url: UrlLike | SingleRequestOptions, options?: Omit<SingleRequestOptions, 'url'>): Request;

for (const method of HttpMethods.filter(r => r.toLowerCase() === r)) {
exports[method] = function onMethod(url: UrlLike | SingleRequestOptions, options?: Omit<SingleRequestOptions, 'url'>) {
const client = new HttpClient({
Expand Down
31 changes: 0 additions & 31 deletions src/methods.d.ts

This file was deleted.

0 comments on commit 85714b7

Please sign in to comment.