TypeScript-Handbook
TypeScript-Handbook copied to clipboard
Improve documentation of typeRoots
A lot of people seem to think it's necessary to specify typeRoots to import things -- e.g., Microsoft/TypeScript#20610. Our documentation says that things in typeRoots are "included", which could cause people to think they need to "include" things to be able to import them, which isn't true -- imports go through module resolution, not typeRoots.
The meaning of "include" also affects the "exclude" option in tsconfig -- a lot of people think they can use it to prevent a file from being imported, for example in Microsoft/TypeScript#21189.