add type assertions and source maps