Open justinfagnani opened 4 years ago
Thanks for the suggestion! I already have functionality in the CLI to analyze a glob/directory called analyzeGlob
. This function creates a program and checker.
It's not aware any tsconfig.json
files, so I'm thinking about supporting giving a path to the tsconfig through the config AnalyzerCliConfig
. This would add/exclude root files in the program by adding include
, exclude
and files
from the tsconfig.json
to the array of globs. It might also be relevant to auto-discover the tsconfig.json
:-)
For programmatic use, one of the simplest APIs I can think of would be to analyze a TypeScript project either by folder, or by reference to tsconfig.json file. The entrypoint, rather than the caller, would create the TypeScript program and checker.