That being said, I've read the microsoft [documentation for the tsconfig](https://www.typescriptlang.org/tsconfig) more times than I can count. In that time I have read through dozens (hundreds???) of blog posts, stack threads, github issues and the like for knowledge or hints about how to properly understand and use the `tsconfig.json` options to no avail.
Issues in the github repo for microsoft/typescript are a great entrypoint for those seeking some background: - https://github.com/microsoft/TypeScript/issues/39965 - https://github.com/microsoft/TypeScript/issues/27481 - https://github.com/microsoft/TypeScript/issues/38546
Every thread like these is the same: years of people showing up to the same forums and repeating the same questions. How can `require` vs `import` still be consuming man-millenia of time and frustration? How is `async` still bringing career and psyche to ruin?
In-the-know folks will point out, that the _real_ issue is no longer `require` vs `import` but
``` import * as bs from 'bs' // VS import bs from 'bs' ```
But there are actually 2 or 3 other mutually exclusive ways of importing packages, depending on which incantations of "module", "target", and "compilerOptions" you cobble together.
typescript provides no overview for installation and setup process and provides no guidance on how to migrate from any particular syntax to any other. I understand the matrix of overlapping inputs and possible outputs makes tsc's job difficult but this is an absurd amount of confusion given that every single person in these threads is just trying to import a package and can't seem to figure out anywhere how to do that.
Suggestions welcome.
As far as the tsconfig goes, I'm with you there; the documentation is a little chaotic and a lot unhelpful. What I have learned to do is start a fresh one every time, enable the strictest settings I can, set up my source code and output structure explicitly (outDir, rootPath, etc.) based off of the comments in a fresh tsconfig.json file, and then leave it alone.
From the various blogs and forum posts I've seen, most people get tied up because they insist on adding all kinds of additional tooling up front. Babel, esbuild, snowpack, jest, the list goes on. Don't do that. Maybe later, if needed, but honestly tsc does the majority of that stuff just fine. Don't prematurely optimize your build and deployment timeline if you can't get imports to work yet.