mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-04 17:20:09 +00:00
Fixed incorrect callback signature (#40954)
This commit is contained in:
committed by
Daniel Rosenwasser
parent
51907a39f8
commit
fee3cc4749
8
types/twilio/index.d.ts
vendored
8
types/twilio/index.d.ts
vendored
@@ -1,6 +1,8 @@
|
||||
// Type definitions for twilio
|
||||
// Type definitions for twilio 2.11
|
||||
// Project: https://github.com/twilio/twilio-node
|
||||
// Definitions by: nickiannone <https://github.com/nickiannone>, Ashley Brener <https://github.com/ashleybrener>
|
||||
// Definitions by: nickiannone <https://github.com/nickiannone>
|
||||
// Ashley Brener <https://github.com/ashleybrener>
|
||||
// Anthony Messerschmidt <https://github.com/CatGuardian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -51,7 +53,7 @@ declare namespace twilio {
|
||||
toPayload(): GrantPayload;
|
||||
}
|
||||
|
||||
export interface RequestCallback { (err: any, data: any, response: Http.IncomingMessage): void; }
|
||||
export interface RequestCallback { (err: any, data: any): void; }
|
||||
|
||||
export interface RestMethod {
|
||||
(callback: RequestCallback): Q.Promise<any>;
|
||||
|
||||
@@ -64,7 +64,7 @@ client.sms.messages.post({
|
||||
|
||||
// Delete a TwiML application
|
||||
// DELETE /2010-04-01/Accounts/ACCOUNT_SID/Applications/APP...
|
||||
client.applications('APP...').delete(function(err, response, nodeResponse) {
|
||||
client.applications('APP...').delete(function(err, response) {
|
||||
//DELETE requests do not return data - if there was no error, it worked.
|
||||
err ? console.log('There was an error') : console.log('it worked!');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user