Skip to content

Commit

Permalink
rename persist plugin configuration to match
Browse files Browse the repository at this point in the history
  • Loading branch information
jmeistrich committed Aug 21, 2024
1 parent 977ca2b commit 67697ff
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/persist-plugins/async-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class ObservablePersistAsyncStorage implements ObservablePersistPlugin {
}
}

export function createObservablePersistAsyncStorage(
export function configureObservablePersistAsyncStorage(
configuration: ObservablePersistAsyncStoragePluginOptions,
): typeof ObservablePersistAsyncStorage {
return class ObservablePersistAsyncStorageConfigured extends ObservablePersistAsyncStorage {
Expand Down
2 changes: 1 addition & 1 deletion src/persist-plugins/indexeddb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ export class ObservablePersistIndexedDB implements ObservablePersistPlugin {
}
}

export function createObservablePersistIndexedDB(
export function configureObservablePersistIndexedDB(
configuration: ObservablePersistIndexedDBPluginOptions,
): typeof ObservablePersistIndexedDB {
return class ObservablePersistIndexedDBConfigured extends ObservablePersistIndexedDB {
Expand Down
2 changes: 1 addition & 1 deletion src/persist-plugins/mmkv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class ObservablePersistMMKV implements ObservablePersistPlugin {
}
}

export function createObservablePersistMMKV(configuration: MMKVConfiguration): typeof ObservablePersistMMKV {
export function configureObservablePersistMMKV(configuration: MMKVConfiguration): typeof ObservablePersistMMKV {
return class ObservablePersistMMKVConfigured extends ObservablePersistMMKV {
constructor() {
super(configuration);
Expand Down
4 changes: 2 additions & 2 deletions tests/persist-indexeddb.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IDBFactory } from 'fake-indexeddb';
import 'fake-indexeddb/auto';
import { observable } from '../src/observable';
import { createObservablePersistIndexedDB } from '../src/persist-plugins/indexeddb';
import { configureObservablePersistIndexedDB } from '../src/persist-plugins/indexeddb';
import { configureSynced } from '../src/sync/configureSynced';
import { mapSyncPlugins, syncObservable } from '../src/sync/syncObservable';
import type { ObservablePersistPlugin, ObservablePersistPluginOptions } from '../src/sync/syncTypes';
Expand All @@ -17,7 +17,7 @@ const persistOptions: ObservablePersistPluginOptions = {
tableNames,
},
};
const myIndexedDBPlugin = createObservablePersistIndexedDB(persistOptions.indexedDB!);
const myIndexedDBPlugin = configureObservablePersistIndexedDB(persistOptions.indexedDB!);
const mySyncOptions = configureSynced({
persist: {
plugin: myIndexedDBPlugin,
Expand Down

0 comments on commit 67697ff

Please sign in to comment.