Immutability with TypeScript