"expression is not callable" with .andThen()
See original GitHub issueHi 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:
Unfortunately I get This expression is not callable.
when calling .andThen()
on it. Curiously enough .map()
works.
Any ideas?
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:15 (9 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
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 😕