Skip to content

Documentation unclear for "Help! My Types Are Missing!" #1185

Answered by cspotcode
ptrk8 asked this question in Q&A
Discussion options

You must be logged in to vote

ts-node --files does not change TypeScript's behavior at all, so everything you need to know about configuring TypeScript, including "baseUrl" and "paths", you can learn from TypeScript's official documentation, the TypeScript Community Discord, or any other online resource.

ts-node without the --files flag changes only one thing: it overrides your tsconfig.json "files" and "include" arrays. If you do ts-node ./index.ts, then it overrides your tsconfig like this:

  "files": ["index.ts"], // only includes the entry-point
  "include": [], // is empty
  // all the rest of your tsconfig is the same

Remember that "paths" affects the way TypeScript resolves types, but it does not affect the wa…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by cspotcode
Comment options

You must be logged in to vote
3 replies
@cspotcode
Comment options

@ptrk8
Comment options

@cspotcode
Comment options

Comment options

You must be logged in to vote
1 reply
@cspotcode
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants