For example, I can do this in other languages, but not TypeScript:
var val1: bool = true;
var val2: bool = false;
val1 &= val2;
TypeScript has the following error if this is tried:
Operator '&=' cannot be applied to types 'bool' and 'bool'
I found this problem because I am writing a primitive utility which "transpiles" Java source code into TypeScript and this limitation of TypeScript would be quite involved to work around.