import { Observable } from 'rxjs'; /** * Converts an Observable stream to an Observable stream * * This operator checks for existing ObjectStore instances with the provided store name. * If there is no previous instance it creates the ObjectStore, otherwise creates a `readwrite` * transaction * * @example * const database$ = connectIndexedDb('test_db'); * // creates an ObjectStore with key-value pairs * const keyValueStore$ = database$.pipe(getObjectStore('test_store')) * // creates an ObjectStore with autoIncrement * const autoIncrementStore$ = database$.pipe(getObjectStore('test_autoincrement_store', { autoIncrement: true })) * * // subscribing to the observable will create the database and the store * keyValueStore$.subscribe({ * next: (db: IDBObjectStore) => console.log(store.name), * error: (e) => console.error(e), * complete: () => console.warn('database deleted') * }); * * autoIncrementStore$.subscribe({ * next: (db: IDBObjectStore) => console.log(store.name), * error: (e) => console.error(e), * complete: () => console.warn('database deleted') * }) * * @remarks Completes when the source database gets deleted. * @param name * @param options - IDBObjectStoreParameters * * @returns Observable */ export declare function getObjectStore(name: string, options?: IDBObjectStoreParameters): (s$: Observable) => Observable;