From fee3cc4749567d3190de9655efa287119500f4e8 Mon Sep 17 00:00:00 2001 From: CatGuardian Date: Fri, 20 Dec 2019 00:59:54 -0600 Subject: [PATCH] Fixed incorrect callback signature (#40954) --- types/twilio/index.d.ts | 8 +++++--- types/twilio/twilio-tests.ts | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/types/twilio/index.d.ts b/types/twilio/index.d.ts index f4684bfa99..f57b01c5ea 100644 --- a/types/twilio/index.d.ts +++ b/types/twilio/index.d.ts @@ -1,6 +1,8 @@ -// Type definitions for twilio +// Type definitions for twilio 2.11 // Project: https://github.com/twilio/twilio-node -// Definitions by: nickiannone , Ashley Brener +// Definitions by: nickiannone +// Ashley Brener +// Anthony Messerschmidt // 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; diff --git a/types/twilio/twilio-tests.ts b/types/twilio/twilio-tests.ts index 2e7682d3b2..90a560ff0f 100644 --- a/types/twilio/twilio-tests.ts +++ b/types/twilio/twilio-tests.ts @@ -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!'); });