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.

TS2349 when trying to run the example

See original GitHub issue

When 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:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
liamtan28commented, May 31, 2020

@lezsakdomi thank you - I’ll investigate shortly.

0reactions
liamtan28commented, Jun 1, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

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