Function Overload
↔ Design Pattern to reuse multiple versions of same function with various Signatures
aka Function-Overloading
Overload Signature
Function Signature with Type annotations but w/o implementation
Function Signature
Type Annotation to define function I/O
!alt use union type or optional parameters
Implementation Signature
overload example
function add(x: string, y: string): string;
function add(x: number, y: number): number;
function add(x: any, y: any): any {
return x + y;
}
which is same as