* Get a serialized snapshot of the store and its schema. * This includes both the data and schema information needed for proper migration. * * @example * ```ts * const snapshot = store.getStoreSnapshot() * localStorage.setItem('myApp', JSON.stringify(snapshot)) * * // Later... * co
(scope: RecordScope | 'all' = 'document')
| 822 | * @public |
| 823 | */ |
| 824 | getStoreSnapshot(scope: RecordScope | 'all' = 'document'): StoreSnapshot<R> { |
| 825 | return { |
| 826 | store: this.serialize(scope), |
| 827 | schema: this.schema.serialize(), |
| 828 | } |
| 829 | } |
| 830 | |
| 831 | /** |
| 832 | * Migrate a serialized snapshot to the current schema version. |
no test coverage detected