Allow query to be undefined (I think that's allowed)

This commit is contained in:
Danila Fedorin 2021-08-13 16:41:13 -07:00
parent b31cf4fdce
commit 3ed639d1c5

View file

@ -18,7 +18,7 @@ import {iterateCursor, reqAsPromise} from "./utils";
type Reducer<A,B> = (acc: B, val: A) => B type Reducer<A,B> = (acc: B, val: A) => B
type IDBQuery = IDBValidKey | IDBKeyRange type IDBQuery = IDBValidKey | IDBKeyRange | undefined
interface QueryTargetInterface<T> { interface QueryTargetInterface<T> {
openCursor: (range?: IDBQuery | null , direction?: IDBCursorDirection) => IDBRequest<IDBCursorWithValue | null>; openCursor: (range?: IDBQuery | null , direction?: IDBCursorDirection) => IDBRequest<IDBCursorWithValue | null>;