Skip to content

bukowskiadam/better-tsc-explain-files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Better TSC --explainFiles output

This tool aims to trace the file load tree.

If you run

tsc --explainFiles

you get something like

src/file.ts
  Imported via './file' from file 'src/other-file.ts'
src/other-file.ts
  Imported via './other-file' from file 'src/main.ts'

It is hard to trace all root files that caused src/file to be loaded.

The goal is to have an output like

src/file.ts < src/other-file.ts < src/main.ts

So you can easily trace the root file

Usage

Run tsc --explainFiles and pipe the output through it

tsc --explainFiles | npx better-tsc-explain-files

Optionally you can provide a file path to output only this file

tsc --explainFiles | npx better-tsc-explain-files "src/file.ts"

It requires TypeScript compiler output in English!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published