immutable and typed js data structures