File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -393,7 +393,7 @@ Returns the open cursor event
393
393
394
394
``` js
395
395
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 ;
397
397
if (cursor) {
398
398
console .log (cursor .value );
399
399
cursor .continue ();
@@ -415,7 +415,7 @@ Open a cursor by index filter.
415
415
416
416
``` js
417
417
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 ;
419
419
if (cursor) {
420
420
console .log (cursor .value );
421
421
cursor .continue ();
Original file line number Diff line number Diff line change @@ -391,7 +391,7 @@ Returns the open cursor event
391
391
392
392
``` js
393
393
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 ;
395
395
if (cursor) {
396
396
console .log (cursor .value );
397
397
cursor .continue ();
@@ -413,7 +413,7 @@ Open a cursor by index filter.
413
413
414
414
``` js
415
415
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 ;
417
417
if (cursor) {
418
418
console .log (cursor .value );
419
419
cursor .continue ();
Original file line number Diff line number Diff line change @@ -520,6 +520,7 @@ export class NgxIndexedDBService {
520
520
* Returns the open cursor event
521
521
* @param storeName The name of the store to have the entries deleted
522
522
* @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
523
524
*/
524
525
openCursor ( storeName : string , keyRange ?: IDBKeyRange , direction : IDBCursorDirection = 'next' ) : Observable < Event > {
525
526
return new Observable ( ( obs ) => {
You can’t perform that action at this time.
0 commit comments