Update typing.js
Improved backward traversing algorithms