When preparing to commit my code in TypeScript, I want to ensure that the type is correct before proceeding. To achieve this, I use the command tsc --noEmit $(changedFile)
. However, this command does not allow for the specification of a config
file.
While exploring potential solutions, I came across the --project
option. However, this option checks the entire project, and I only want to verify the type of the changedFile
. Some old files
may have type errors, but they do not require immediate attention.
How can I specifically validate the type of the changedFile
before committing my changes?