Generate types before types members.
Generate everything inside nested modules like:
module a.b { ... }.

Add angularjs typing.