typescript not inferring types

Viewed 177

I have a project that seems my tsconfig.json have some missing configuration for inferring types.

This is my tsconfig.json

{
  "compilerOptions": {
    "target": "es5",
    "module": "esnext",
    "lib": [
      "dom"
    ],
    "allowJs": true,
    "jsx": "react",
    "declaration": true,
    "declarationMap": true,
    "outDir": "dist",
    "rootDir": "lib",
    "strict": true,
    "moduleResolution": "node",
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true
  },
  "exclude": [
    "lib/**/*.spec.tsx",
    "lib/**/*.stories.tsx",
    "lib/settings/*.ts"
  ]
}

And I have this error bellow:

To solve, I had to import AnyStyledComponent manually as can see bellow:

I am missing something?

1 Answers

I think your problem has to do with this

Related