This is exactly the issue I bumped into eight or so years ago. I had a ratchet style job that would maintain a file of all of the type issues in the system. Add one, remove one was very common - particularly when it amounted "transform one" so the error change is all on the same line. Note that this is compounded by the errors often showing up quite far away from the code change.
I ended up using something similar to `// @ts-ignore` which would encode a truncated hash of the error message on the line, as well as a truncated hash of the lines AST; the original error message and the justification.
These were long lines so were a PITA, but they immediately had this 'ratchet' effect.
I tried several times to move to a central file referencing the issues, but the complexity in maintaining the references with common refactors was a blocker.
I ended up using something similar to `// @ts-ignore` which would encode a truncated hash of the error message on the line, as well as a truncated hash of the lines AST; the original error message and the justification.
These were long lines so were a PITA, but they immediately had this 'ratchet' effect.
I tried several times to move to a central file referencing the issues, but the complexity in maintaining the references with common refactors was a blocker.