TS2349 when trying to run the example
See original GitHub issueWhen trying to run the specified example (i.e. deno run --allow-net --config=tsconfig.json https://deno.land/x/dactyl/example/index.ts
), I get:
error: TS2349 [ERROR]: This expression is not callable.
Each member of the union type '{ <P extends Record<string | number, string | undefined> = Record<string | number, string | undefined>, S extends Record<string | number | symbol, any> = Record<string, any>>(name: string, path: stri
ng, ...middleware: RouterMiddleware<...>[]): Router<...>; <P extends Record<...> = Record<...>, S extends Record<...> ...' has signatures, but none of those signatures are compatible with each other.
this[route.requestMethod](
~~~~~~~~~~~~~~~~~~~~~~~~~
at https://deno.land/x/dactyl/Router.ts:74:7
deno --version
says:
deno 1.0.2
v8 8.4.300
typescript 3.9.2
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
"TS2349: Cannot invoke an expression whose type lacks a ...
This is with TypeScript version 1.8.4.0 working in a TSX file in VS2015. Code. The actual code is a big React component, so...
Read more >How to fix "TS2349: Cannot invoke an expression whose type ...
The module you are trying to use is an ES6 module, so you must import it using ES6 syntax: import createBrowserHistory from ...
Read more >ts2349: this expression is not callable. type 'void' has no call ...
app/Services/Ws.ts:9:15 - error TS2349: This expression is not callable. ... Sorry, I'm new to deno and couldn't run an example to try it....
Read more >This expression is not callable. Type 'X' no call signatures
Type 'String' has no call signatures.ts(2349) str(true);. The example shows how trying to call a string as a function causes the error.
Read more >TypeScript errors and how to fix them
When you want to use a type to construct instances (or do anything else ... error TS2349: Cannot invoke an expression whose type...
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 Free
Top 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
@lezsakdomi thank you - I’ll investigate shortly.
Thank you @lezsakdomi for spotting this - it wasn’t my intention to rely on Oak master here, I will lock the version to 4.0.0 for now and upgrade when I have time. I suspect the Oak API will be a little unstable for the time being as Deno v1 just dropped.