Javascript type system