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.

TypeScript Error: This expression is not callable

See original GitHub issue

I’m getting the following TypeScript error when I use this package in a .tsx file. TS2349: This expression is not callable. Not all constituents of type 'FunctionTemplate | undefined' are callable. Type 'undefined' has no call signatures.

  • tsc version: 4.0.5
  • tailwind-styled-components version: 1.0.6

TypeScript configuration:

{
  "compilerOptions": {
    "target": "es5",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "allowJs": true,
    "skipLibCheck": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "noEmit": true,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "jsx": "preserve",
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true
  },
  "include": [
    "**/*.ts",
    "**/*.tsx"
  ],
  "exclude": [
    "./node_modules",
    "**/**/*.svg"
  ]
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
MathiasGilsoncommented, Jan 5, 2021

Just push the version 1.0.7 that should solve this issue.

Many thanks for your detailed reports

0reactions
MathiasGilsoncommented, Jan 5, 2021

Setting "strict": false in tsconfig.json removed the error. I know this is not a solution, I’ll try to make the package strictly type. Stay tuned!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript: This expression is not callable. Type ' ...
Based on your error Type '{ getUserInfo(requestData: object): Promise; }' has no call signatures instead of calling something(requestData) ...
Read more >
This expression is not callable. Type 'X' no call signatures
The "This expression is not callable. Type 'X' has no call signatures" TypeScript error occurs when we try to call a type that...
Read more >
Typescript error This expression is not callable. · Issue #2404
I am getting the following error even when using fastify examples from the documentation. src/dist-server.ts:3:16 - error TS2349: This ...
Read more >
this expression is not callable. type 'void' has no call ...
To solve the "This expression is not callable. Type 'X' has no call signatures" TypeScript error: Make sure the value you are calling...
Read more >
Typescript express-jwt - This expression is not callable Error
Defining the constant Blockquote export const checkJwt = jwt({ secret: jwksRsa.expressJwtSecret({ cache: true, rateLimit: true, ...
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