From 3d032bd51037f5edfd008c1cfb3acf96a11138a1 Mon Sep 17 00:00:00 2001 From: Ethan Resnick Date: Tue, 13 Sep 2016 17:02:08 -0400 Subject: [PATCH] Split up TwimlMethod signature By splitting up the union into an overload, we get much more useful typing than just (any, any) --- twilio/twilio.d.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/twilio/twilio.d.ts b/twilio/twilio.d.ts index 84c0d02394..8d5c44984b 100644 --- a/twilio/twilio.d.ts +++ b/twilio/twilio.d.ts @@ -379,7 +379,10 @@ declare namespace twilio { legalNodes: Array; } - export interface TwimlMethod { (arg1: any | string | TwimlCallback, arg2?: any | string | TwimlCallback): Node } + export interface TwimlMethod { + (arg1: TwimlCallback | string, arg2?: any): Node + (arg1: any, arg2?: TwimlCallback | string): Node + } export interface TwimlCallback { (node: Node): void; }