Closed
Description
The following code compiles fine with 1.1 compiler (and even the 1.3 language service), but produces an error when using the 1.4 language service when the TypeScriptToolsVersion element is set to 1.1. The code below has to do with function overloading of sorts, and I can see why the type checking fails, but I thought it was a stated goal that upgrading to a new language service but keeping an old compiler should not break anything (as long as, of course, new features aren't used)
module Test {
export function baseMethodOverload(a: string, b: number, ...arr: Int32Array[]): string {
// Argument of type 'Int32Array[]' is not assignable to the parameter of type 'string | number'
return baseMethod.apply(this, [a, b, "c"].concat(arr));
}
export function baseMethod(a: string, b: number, c: string, ...arr: Int32Array[]): string {
return a + b + c;
}
}