Skip to content

Commit

Permalink
Merge pull request DefinitelyTyped#5462 from Jwsonic/patch-1
Browse files Browse the repository at this point in the history
Add an interface definition for HTTPOptions
  • Loading branch information
vvakame committed Aug 25, 2015
2 parents f41d336 + e48415a commit 5c1a341
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion parse/parse.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ declare module Parse {
useMasterKey?: boolean;
}

interface HTTPOptions {
url: string;
body?: any;
error?: Function;
followRedirects?: boolean;
headers?: any;
method?: string;
params?: any;
success?: Function;
}

interface CollectionOptions {
model?: Object;
query?: Query;
Expand Down Expand Up @@ -796,7 +807,7 @@ declare module Parse {
function beforeDelete(arg1: any, func?: (request: BeforeDeleteRequest, response: BeforeDeleteResponse) => void): void;
function beforeSave(arg1: any, func?: (request: BeforeSaveRequest, response: BeforeSaveResponse) => void): void;
function define(name: string, func?: (request: FunctionRequest, response: FunctionResponse) => void): void;
function httpRequest<T>(options: ParseDefaultOptions): Promise<HttpResponse>;
function httpRequest(options: HTTPOptions): Promise<HttpResponse>;
function job(name: string, func?: (request: JobRequest, status: JobStatus) => void): HttpResponse;
function run<T>(name: string, data?: any, options?: ParseDefaultOptions): Promise<T>;
function useMasterKey(): void;
Expand Down

0 comments on commit 5c1a341

Please sign in to comment.