title: Typesafe Javascript
body: <p>Is there a way to enforce types in JavaScript? I'm thinking of a pre-processor which takes an input file written in ActionScript 3 or Java and converts it to JS.</p>
  
  <p>I do not need a big run-time apparatus, I just need to introduce the idea of compile-time in my workflow and run the trivial compile-time checks on my code (and also use interfaces). Neither I need the API from Java or Flex, just the syntax.</p>
  
  <p>The standard browser-functions could also be checked against the IDL definitions, but it is not a must.</p>