function replace(value) {
    return (
      '&' +
      characterReferences[
        /** @type {keyof typeof characterReferences} */ (value)
      ] +
      ';'
    )
  }
@param {string} value
  Value to replace.
@returns {string}
  Encoded value.