Fixed incorrect callback signature (#40954)

This commit is contained in:
CatGuardian
2019-12-20 00:59:54 -06:00
committed by Daniel Rosenwasser
parent 51907a39f8
commit fee3cc4749
2 changed files with 6 additions and 4 deletions

View File

@@ -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>;

View File

@@ -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!');
});