Port HistoryExpander to typescript

Eyyy first type error caught! It's starting to pay off.
Port Parser to typescript
Port pool.js to typescript
port historywidget to typescript