Practic BUI (Base UI) - v1.0.0
    Preparing search index...

    Variable persistDocumentMigrateConst

    persistDocumentMigrate: (
        values: PersistValues,
        from: number,
        to?: number,
        migrations?: readonly PersistDocumentMigration[],
    ) => PersistValues | undefined

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

    Type Declaration

      • (
            values: PersistValues,
            from: number,
            to?: number,
            migrations?: readonly PersistDocumentMigration[],
        ): PersistValues | undefined
      • Parameters

        • values: PersistValues

          The document's stored values.

        • from: number

          The version they were written at.

        • Optionalto: number

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

        • Optionalmigrations: readonly PersistDocumentMigration[]

          The steps, by the version each upgrades from.

        Returns PersistValues | undefined

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