Create type.js

This is a coffee script translated JS file.