If you are making a library, this is where you should export everything.
Having a single entry point at index.ts gives you total control over what
you export to the outside world.
You can make the task easier by adding index.ts files in each folder
specifying exactly what you want to expose and having the index.ts in the
parent folders re-export everything from them.
Reserve all index.ts files to the single task of exporting to the outside
world. Do not declare anything in them.
If you are making a library, this is where you should export everything. Having a single entry point at
index.tsgives you total control over what you export to the outside world.You can make the task easier by adding
index.tsfiles in each folder specifying exactly what you want to expose and having theindex.tsin the parent folders re-export everything from them.Reserve all
index.tsfiles to the single task of exporting to the outside world. Do not declare anything in them.