Practic Persist - v1.0.0
    Preparing search index...

    Function persistDocumentMigrate

    • Brings stored values from the version they were written at up to another, one migration at a time.

      Parameters

      • values: PersistValues

        The document's stored values.

      • from: number

        The version they were written at.

      • to: number = persistDocumentVersion

        The version to reach; this contract's own by default.

      • migrations: readonly PersistDocumentMigration[] = persistDocumentMigrations

        The steps, by the version each upgrades from.

      Returns PersistValues | undefined

      The upgraded values, or nothing when a step is missing.