Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with combining Array types? Error: Cannot invoke an expression whose type lacks a call signature #15315

Closed
khusamov opened this issue Apr 22, 2017 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@khusamov
Copy link

TypeScript Version: 2.2.1

Code

function getHandler(handlers: number[] | string[]): any {
    return handlers.map(handler => handler);
}

Expected behavior:
Without error!

Actual behavior:
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.

@mhegazy
Copy link
Contributor

mhegazy commented Apr 24, 2017

Duplicate of #7294

@mhegazy mhegazy added the Duplicate An existing issue was already created label Apr 24, 2017
@mhegazy
Copy link
Contributor

mhegazy commented May 8, 2017

This issue seems to have been already addressed or is unactionable at the moment. I am auto-closing it for now.

@mhegazy mhegazy closed this as completed May 8, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

2 participants