Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type definitions not being imported #33

Closed
farah opened this issue Jul 1, 2020 · 0 comments
Closed

Type definitions not being imported #33

farah opened this issue Jul 1, 2020 · 0 comments

Comments

@farah
Copy link

farah commented Jul 1, 2020

I'm getting the following type error when trying to use this package as:

import serializeError from "serialize-error";
const serializedError = serializeError(error);
This expression is not callable.
  Type 'typeof import("/Users/farah/{PATH}/node_modules/serialize-error/index")' has no call signatures.ts(2349)
Cannot invoke an expression whose type lacks a call signature. Type 'typeof "/Users/farah/{PATH}/node_modules/serialize-error/index"' has no compatible call signatures.ts(234

tsconfig.js

{
  "compilerOptions": {
    "target": "es2015",
    "declaration": true,
    "lib": ["esnext", "dom"],
    "baseUrl": "src",
    "allowJs": true,
    "rootDir": "src",
    "skipLibCheck": true,
    "importHelpers": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": false,
    "forceConsistentCasingInFileNames": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noUnusedLocals": false,
    "noEmit": true,
    "jsx": "preserve"
  },
  "typeAcquisition": {
    "enable": true
  },
  "exclude": ["node_modules", "build", "scripts"],
  "include": ["src", "types"]
}

Have tried both v6 and v7.

@farah farah closed this as completed Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant