This is a neat idea.  Even with a significant perf hit, it could be used during development, testing, and debugging.  You should propose this to the Typescript team! <a href="https:&#x2F;&#x2F;github.com&#x2F;Microsoft&#x2F;TypeScript&#x2F;issues" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Microsoft&#x2F;TypeScript&#x2F;issues</a>