Typescript
Created: Jul 6 2025, 22:31 UTC
Last modified: Jul 6 2025, 22:31 UTC
Project structure with tsconfig.json
The rootDir
config defines the root of all source files. By default this
is the longest common path of all non-declaration input files.
The structure under rootDir
will be preserved in the output directory.
Relative imports are relative to this directory.
The include
config will define more specifically which files should be
included. You could include all *.ts files here for example.
If include
pulls in files that are not in rootDir
, you will get an
error. But presumably you could stash files under rootDir
that the
include
parameters does not pull in, and that would not be an error.