From 262f69018bce7a7a11bfbd0bc663c29cd501bb6d Mon Sep 17 00:00:00 2001 From: Erik Mogensen Date: Tue, 27 Sep 2016 13:48:39 +0200 Subject: [PATCH] path can be string or a hash of options As per http://restify.com/#client-api it states: > Note that all further documentation refers to the "short-hand" > form of methods like get/put/del which take a string path. You > can also pass in an object to any of those methods with extra > params (notably headers): So the path can be either a string or a hash of options. --- restify/restify.d.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/restify/restify.d.ts b/restify/restify.d.ts index 65b3f44d47..a1b933f419 100644 --- a/restify/restify.d.ts +++ b/restify/restify.d.ts @@ -470,12 +470,12 @@ declare module "restify" { } interface Client { - get: (path: string, callback?: (err: any, req: Request, res: Response, obj: any) => any) => any; - head: (path: string, callback?: (err: any, req: Request, res: Response) => any) => any; - post: (path: string, object: any, callback?: (err: any, req: Request, res: Response, obj: any) => any) => any; - put: (path: string, object: any, callback?: (err: any, req: Request, res: Response, obj: any) => any) => any; - patch: (path: string, object: any, callback?: (err: any, req: Request, res: Response, obj: any) => any) => any; - del: (path: string, callback?: (err: any, req: Request, res: Response) => any) => any; + get: (opts: any, callback?: (err: any, req: Request, res: Response, obj: any) => any) => any; + head: (opts: any, callback?: (err: any, req: Request, res: Response) => any) => any; + post: (opts: any, object: any, callback?: (err: any, req: Request, res: Response, obj: any) => any) => any; + put: (opts: any, object: any, callback?: (err: any, req: Request, res: Response, obj: any) => any) => any; + patch: (opts: any, object: any, callback?: (err: any, req: Request, res: Response, obj: any) => any) => any; + del: (opts: any, callback?: (err: any, req: Request, res: Response) => any) => any; basicAuth: (username: string, password: string) => any; }