This repository was archived by the owner on Nov 19, 2025. It is now read-only.

Description
They currently return a mutable POJO, but the problem is that many of its properties should really be computed as they depend on other properties. For example content.type is effectively this.layer.type || this.item.type.
We get into trouble when the dependent properties are set before their dependences. In the above example, for private items, we don't have this.layer for private items until we've fetched the server info, so we need to remember to update type an anything else that depends on layer, or the updated type, and so on. This has been the cause of a few sublte bugs.
See #667 (comment) for a description of how that PR introduced seter functions to mitigate such bugs.
If we stick w/ the current functional approach, it may be an improvement to make the returned POJOs immutable using something like deepFreeze. We are already trying to treat them as such since many