Page MenuHomePhabricator

[Task] Make the JavaScript data model immutable
Open, NormalPublic

Description

Immutable means: Remove all setters. We barely use them. We create API requests and then recreate the relevant data model objects, but do not actually change them client side.

This probably needs two steps:

  1. Remove all setters on high level objects (e.g. Term, Statement and so on). But keep the lower level functions (e.g. Map.setItem) because they are used.
  2. Remove all remaining setters.

See https://github.com/wmde/WikibaseDataModelJavaScript/pull/54.