I would like to create a method that accepts either an array of strings, or allow strings to be supplied as a rest parameter. When I try this, I get a compiler warning that "Overload Signature Is Not Compatible".
As the rest parameter results in a string array, shouldn't this be okay?
class Example {
test(...strArray: string[]);
test(strArray: string[]);
test(strArray: string[]) {
alert(strArray.length.toString());
}
}