Dependent JavaScript: A Typed Dialect