Attempts to clarify how to use global module definitions. #698
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A common point of user confusion lies around module definitions. TypeScript compiles everything by default, so it can "discover" loose module definitions floating around the working directory. ts-node only compiles what is necessary, so it will not discover anything automatically unless it is part of the module search path (such as
node_modules
by default).This documentation update tries to make it a bit more clear to readers exactly what they need to do in order to get global module definitions picked up by ts-node. Hopefully it will help reduce support requests related to global module definitions that "work fine with
tsc
" but "don't work withts-node
".