Skip to content

Commit 6aaa6de

Browse files
committed
Merge branch 'master' into feat/integration-ssr-api
2 parents e23352b + 7e1c325 commit 6aaa6de

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ Returns the open cursor event
393393

394394
```js
395395
this.dbService.openCursor('people', IDBKeyRange.bound("A", "F")).subscribe((evt) => {
396-
var cursor = (evt.target as IDBOpenDBRequest).result;
396+
const cursor = (evt.target as IDBOpenDBRequest).result as unknown as IDBCursorWithValue;
397397
if(cursor) {
398398
console.log(cursor.value);
399399
cursor.continue();
@@ -415,7 +415,7 @@ Open a cursor by index filter.
415415

416416
```js
417417
this.dbService.openCursorByIndex('people', 'name', IDBKeyRange.only('john')).subscribe((evt) => {
418-
var cursor = (evt.target as IDBOpenDBRequest).result;
418+
const cursor = (evt.target as IDBOpenDBRequest).result as unknown as IDBCursorWithValue;
419419
if(cursor) {
420420
console.log(cursor.value);
421421
cursor.continue();

projects/ngx-indexed-db/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ Returns the open cursor event
391391

392392
```js
393393
this.dbService.openCursor('people', IDBKeyRange.bound("A", "F")).subscribe((evt) => {
394-
var cursor = (evt.target as IDBOpenDBRequest).result;
394+
const cursor = (evt.target as IDBOpenDBRequest).result as unknown as IDBCursorWithValue;
395395
if(cursor) {
396396
console.log(cursor.value);
397397
cursor.continue();
@@ -413,7 +413,7 @@ Open a cursor by index filter.
413413

414414
```js
415415
this.dbService.openCursorByIndex('people', 'name', IDBKeyRange.only('john')).subscribe((evt) => {
416-
var cursor = (evt.target as IDBOpenDBRequest).result;
416+
const cursor = (evt.target as IDBOpenDBRequest).result as unknown as IDBCursorWithValue;
417417
if(cursor) {
418418
console.log(cursor.value);
419419
cursor.continue();

projects/ngx-indexed-db/src/lib/ngx-indexed-db.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,7 @@ export class NgxIndexedDBService {
520520
* Returns the open cursor event
521521
* @param storeName The name of the store to have the entries deleted
522522
* @param keyRange The key range which the cursor should be open on
523+
* @param direction A string telling the cursor which direction to travel. The default is next
523524
*/
524525
openCursor(storeName: string, keyRange?: IDBKeyRange, direction: IDBCursorDirection = 'next'): Observable<Event> {
525526
return new Observable((obs) => {

0 commit comments

Comments
 (0)