TypeScript: renamed `then` to `thenDo`

fixes #307