justkey007 / tsc-alias

Replace alias paths with relative paths after typescript compilation
MIT License
876 stars 63 forks source link

fix: make `--inputglob` and `--outputcheck` work on their own #216

Closed deeptoaster closed 3 months ago

deeptoaster commented 5 months ago

A command like tsc-alias -p tsconfig.json --inputglob js --outputcheck js currently fatals with

            fileExtensions.inputGlob = options.fileExtensions.inputGlob;
                                     ^

TypeError: Cannot set properties of undefined (setting 'inputGlob')

because the removed lines leave fileExtensions unset when used with a config that doesn't contain that field. (A workaround is to put a dummy "tsc-alias": { "fileExtensions": {} } in tsconfig.json.)