I recently came across this article discussing module resolution in TypeScript.
After reading the section "@types, typeRoots and types" in the documentation of tsconfig.json
, I realized that the story might not be complete. It seems that type definition files are also retrieved from the node_modules/@types directory.
This particular feature was mentioned in an announcement found here, with further explanation provided here.
I am posting this question on SO to seek validation regarding my understanding of this concept, as well as to potentially report a documentation error to the TypeScript team (I found the ticket submission guidelines on GitHub intimidating).
Therefore, do you agree that the linked documentation may be incomplete?