port help.js to typescript
remove obsolete reference to main.d.ts
Port CLI to typescript