In my Typescript project, I am currently working on creating a grunt task to gather statistics from the source files. I have a function that takes one source file at a time, runs typescript.createSourceFile on it, and performs some actions on the resulting AST. However, my challenge lies in identifying all the files to iterate over. My goal is to retrieve the exact list of files that will be compiled by tsc -p tsconfig.json later on. Once I have this list, I plan to filter out certain files before iterating over the modified list.
Although I anticipate using the typescript module for this task, I have not been able to locate a suitable function to achieve it. Upon examining the source code of tsc, I discovered where the transformation from tsconfig to a list of files occurs. Unfortunately, it seems like the utilized function is not exported for external use.