<!-- BUGS: Please use this template. --> <!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript --> <!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md --> **TypeScript Version:** 2.5.2 **Code** ```ts 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.