This code causes an error, the text of which is given below:
function getHandler(handlers: number[] | string[]): any {
return handlers.map(handler => handler);
}
Error text:
error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{ (this: [string, string, string, string, string], callbackfn: (value: string, index: number, ...' has no compatible call signatures.