mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 04:49:15 +08:00
[restify] add patch function definition
This commit is contained in:
@@ -312,6 +312,7 @@ client = restify.createStringClient({
|
||||
|
||||
client.head('test', function(err: any, req: restify.Request, res: restify.Response) { });
|
||||
client.put('path', {}, function(err: any, req: restify.Request, res: restify.Response, obj: any) { });
|
||||
client.patch('path', {}, function(err: any, req: restify.Request, res: restify.Response, obj: any) { });
|
||||
client.del('path', function(err: any, req: restify.Request, res: restify.Response) { });
|
||||
|
||||
client.post('/foo', { hello: 'world' }, function(err: any, req: restify.Request, res: restify.Response, obj: any) {
|
||||
|
||||
2
restify/restify.d.ts
vendored
2
restify/restify.d.ts
vendored
@@ -473,6 +473,7 @@ declare module "restify" {
|
||||
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;
|
||||
basicAuth: (username: string, password: string) => any;
|
||||
}
|
||||
@@ -482,6 +483,7 @@ declare module "restify" {
|
||||
head: (path?:any, callback?: Function) => any;
|
||||
post: (opts?: any, callback?: Function) => any;
|
||||
put: (opts?: any, callback?: Function) => any;
|
||||
patch: (opts?: any, callback?: Function) => any;
|
||||
del: (opts?: any, callback?: Function) => any;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user