Reproducing an issue with typescript compiler