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