Closed
Description
TypeScript Version: 3.1.0-dev.20180722
Code
declare var f1: (... args: any[]) => void;
declare var f2: () => void;
declare var f3: (...args: []) => void;
declare var f4: (a: never) => void;
f1 = f2; // ok
f1 = f3; // error
f1 = f4; // error
Expected behavior:
I want to create function types that are assignable to f1 using tuple types ala f3. I expected f3 to behave more like f2 than f4.
Actual behavior:
f3 cannot be assigned to f2.
But adding any type into f3's args tuple makes the error go away.