Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 41 additions & 39 deletions types/snekfetch/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// Type definitions for snekfetch 3.1
// Type definitions for snekfetch 3.6
// Project: https://github.com/GusCaplan/snekfetch
// Definitions by: Iker Pérez Brunelli <https://github.com/DarkerTV>
// Shayne Hartford <https://github.com/ShayBox>
// Yukine <https://github.com/Dev-Yukine>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
// TypeScript Version: 2.4

/// <reference types="node" />

Expand Down Expand Up @@ -71,48 +73,48 @@ declare class Snekfetch extends Readable {

constructor(method: Snekfetch.methods, url: string, opts?: Snekfetch.SnekfetchOptions);

static acl(url: string): Snekfetch;
static bind(url: string): Snekfetch;
static checkout(url: string): Snekfetch;
static connect(url: string): Snekfetch;
static copy(url: string): Snekfetch;
static delete(url: string): Snekfetch;
static get(url: string): Snekfetch;
static head(url: string): Snekfetch;
static link(url: string): Snekfetch;
static lock(url: string): Snekfetch;
static msearch(url: string): Snekfetch;
static merge(url: string): Snekfetch;
static mkactivity(url: string): Snekfetch;
static mkcalendar(url: string): Snekfetch;
static mkcol(url: string): Snekfetch;
static move(url: string): Snekfetch;
static notify(url: string): Snekfetch;
static options(url: string): Snekfetch;
static patch(url: string): Snekfetch;
static post(url: string): Snekfetch;
static propfind(url: string): Snekfetch;
static proppatch(url: string): Snekfetch;
static purge(url: string): Snekfetch;
static put(url: string): Snekfetch;
static rebind(url: string): Snekfetch;
static report(url: string): Snekfetch;
static search(url: string): Snekfetch;
static subscribe(url: string): Snekfetch;
static trace(url: string): Snekfetch;
static unbind(url: string): Snekfetch;
static unlink(url: string): Snekfetch;
static unlock(url: string): Snekfetch;
static unsubscribe(url: string): Snekfetch;
static brew(url: string): Snekfetch;

query(name: string, value: string): Snekfetch;
static acl(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static bind(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static checkout(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static connect(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static copy(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static delete(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static get(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static head(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static link(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static lock(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static msearch(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static merge(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static mkactivity(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static mkcalendar(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static mkcol(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static move(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static notify(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static options(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static patch(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static post(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static propfind(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static proppatch(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static purge(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static put(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static rebind(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static report(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static search(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static subscribe(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static trace(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static unbind(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static unlink(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static unlock(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static unsubscribe(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;
static brew(url: string, opts?: Snekfetch.SnekfetchOptions): Snekfetch;

query(name: string | { [key: string]: string | string[] }, value?: string): Snekfetch;

set(name: string | { [key: string]: string | string[] }, value?: string | string[]): Snekfetch;

attach(name: string, data: string | object | Buffer, filename?: string): Snekfetch;

send(data?: any): Snekfetch;
send(data?: string|Buffer|object): Snekfetch;

then(): Promise<Snekfetch.Result>;
then<T>(resolver: (res: Snekfetch.Result) => T, rejector?: (err: Error) => any): Promise<T>;
Expand Down