Split up TwimlMethod signature

By splitting up the union into an overload, we get much more useful
typing than just (any, any)
This commit is contained in:
Ethan Resnick
2016-09-19 18:59:41 -04:00
parent ae92456e05
commit 3d032bd510
+4 -1
View File
@@ -379,7 +379,10 @@ declare namespace twilio {
legalNodes: Array<string>;
}
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; }