Add rx.js typing.
Fix typescirpt generation bugs.