It‘s common for even the best programmers to make simple mistakes. And sometimes a refactoring which seems safe can leave behind code which will never do what’s intended.
You can think of the TypeScript compiler as a linter for the Language Spec. Tsetse is essentially an extension to that spec, adding new patterns which are disallowed in TypeScript programs. The tsetse library lets us plug new third-party checks into the standard compiler.
Currently, Tsetse is built into the Bazel TypeScript compiler. However we hope that it will be possible to plug into the standard
tsc compiler later.
Tsetse is modelled on the Error Prone project for Java.
const s = " Hello, world! "; s.trim();
$ bazel build :all mycode.ts(2,1): error TS21222: return value is unused. See http://tsetse.info/check-return-value