Better handling for type annotations across commonjs modules
R=johnlenz