0

Typescript Question
This is something that's been bugging me for a longer time now.
I did couple of React/typescript project (CRA) and it just keeps on happening and I have no idea why and even better - I have no idea how to query google with about problem.
From time to time I open a file that I KNOW was without any errors and suddenly BOOM - Parameter 'XYZ' implicitly has an 'any' type. And now I need to go and add explicit types everywhere it wants me to. TS Server restart doesnt help. Why does this keep happening? Any Typescript guru please?

Comments
  • 0
    Isnt that more of a VS/Intellisense issue? If it builds correctly and browser doesnt give you any errors/warnings about it, then u can focus on fixing extensions/VS
  • 0
    Check your tsconfig.json for "noImplicitAny".

    Also go and install types for redux via npm i @types/reduxjs

    Unsure if this will do anything
  • 0
    @azuredivay a lot of Typescript build processes use esbuild and babel which don't raise type errors and just remove type annotations from the AST.
Add Comment