Overloaded Functions
Documentation
The getWidget
function accepts a number and returns a Widget, or accepts a string and returns a Widget array.
Code
let x: Widget = getWidget(43); let arr: Widget[] = getWidget("all of them");
Declaration
declare function getWidget(n: number): Widget; declare function getWidget(s: string): Widget[];
Please login to continue.