class Bar implements Fooable {
Foo(n: number): string;
Foo(n: string): string;
Foo(n: any) {
if(typeof n === 'number') {
return n + ' is a number';
} else if(typeof n === 'string') {
return n + ' is a string';
} else {
throw new Error("Oops, null/undefined?");
}
}
}