Closed
Description
TypeScript Version: 2.5.2
Code
function test(items: string[] | number[]) {
items.forEach(item => console.log(item));
}
Expected behavior:
no error
Actual behavior:
Cannot invoke an expression whose type lacks a call signature. Type '((callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void) | ...' has no compatible call signatures.