Support type assertions for es6 output

fix #1442