I have the following problem example. In TypeScript 0.9, I seem to be able to name the final signature of the overloaded method:
class Test { method(...names: string[]) : void; method(names: string[]) : void { } } var x= new Test(); x.method('One', 'Two', 'Three'); x.method(['One', 'Two', 'Three']);
In TypeScript 0.8.x, you will need to specify a third signature, this way:
class Test { method(...names: string[]) : void; method(names: string[]) : void; method(names: any) : void { } } var x= new Test(); x.method('One', 'Two', 'Three'); x.method(['One', 'Two', 'Three']);
Should the final signature not be hidden? (Because it will most likely contain a generic signature with types of any , etc.).
source share