Rename Field

// BEFORE
class Organization {
  get name() {...}
}
// AFTER
class Organization {
  get title() {...}
}
  • If the record has limited scope, rename all accesses to the field and test; no need to do the rest of the mechanics.
  • If the record isn't already encapsulated, apply Encapsulate Record
  • Rename the private field inside the object, adjust internal methods to fit.
  • If the constructor uses the name, apply 124 Change Function Declaration to rename it.
  • Apply 124 Change Function Declaration to the accessors.

Backlinks