question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"expression is not callable" with .andThen()

See original GitHub issue

Hi there,

thanks for the amazing lib, love using every chance to make JS more Rusty and safe.

I did not manage to get a minimal repro yet, but I thought I’d post already in case someone has an idea.

This is the type signature of my Result-returning-function: image

Unfortunately I get This expression is not callable. when calling .andThen() on it. Curiously enough .map() works.

Any ideas?

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
incetarikcommented, Oct 20, 2022

I see, in short this error occurs when the overloads are not compatible with each other. I may try to fix this but that may cause changing the types and interfaces accordingly, yet I would try to minimize the visible changes to outside. I’ll do several things when I’m free but these days I’m busy, I’ll notify you about this when I start. @supermacro

1reaction
boredcitycommented, Oct 13, 2022

Honestly, I think I’m ready to throw in the towel at this point 😖 If I find a solution for it at some point in the future and the problem still persists I’d be happy to create a PR, but for now, it’s probably better to let someone with a better handle on Typescript have a go at this 😕

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not all constituents of type 'number | function' are callable
It is certainly possible to describe the call signature of add() so that callers will see the desired behavior. Unfortunately the TypeScript ...
Read more >
Make all expressions recursively callable · Issue #5105 - GitHub
So we make it clearer by having id[n - 1] return an object that returns the nth argument. By the way, I just...
Read more >
this expression is not callable. angular - You.com
the error message : Unable to resolve signature of parameter decorator when called as an expression. This expression is not callable.
Read more >
TypeError 'module' object is not callable in Python - STechies
You can use the functions such as factorial(), floor() and fabs() within this module. But if you try using a function with name...
Read more >
Lambda Expressions (The Java™ Tutorials > Learning the ...
Examples and practices described in this page don't take advantage of ... not. In this case, the type of the lambda expression ()...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found