TypeScript-Handbook icon indicating copy to clipboard operation
TypeScript-Handbook copied to clipboard

Improve documentation of typeRoots

Open ghost opened this issue 8 years ago • 1 comments

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.

ghost avatar Dec 12 '17 15:12 ghost

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.

Andy-MS avatar Jan 16 '18 16:01 Andy-MS