Immutable types for javascript