Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-1620

[Deprecation] Prefix callbacks in configuration with `on`

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      We have decided to prefix callbacks in the Realm configuration with on. Before this breaking change, we need to issue a deprecation warning (API doc and TS defs).

      Callback provided by a user, which is called on events (and returns void) should be prefixed with "on".

      We have identified the following callbacks (there might be more ...):

      • migration (onMigration)
      • shouldCompactOnLaunch (shouldCompact)
      • error (onError)
      • clientResetBefore (onBefore)
        {}{ sync: { clientReset: { onBefore() { /**/ } } } }{}
      • clientResetAfter (onAfter)
      • validateCallback (validateCertificates)

            Assignee:
            andrew.meyer@mongodb.com Andrew Meyer
            Reporter:
            kenneth.geisshirt@mongodb.com Kenneth Geisshirt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: