Use method syntax in QueryTarget.

This commit is contained in:
Danila Fedorin 2021-08-19 16:44:50 -07:00
parent 704a8d99c7
commit 19bababa68

View file

@ -21,12 +21,12 @@ type Reducer<A,B> = (acc: B, val: A) => B
export type IDBQuery = IDBValidKey | IDBKeyRange | undefined | null
interface QueryTargetInterface<T> {
openCursor: (range?: IDBQuery, direction?: IDBCursorDirection | undefined) => IDBRequest<IDBCursorWithValue | null>;
openKeyCursor: (range?: IDBQuery, direction?: IDBCursorDirection | undefined) => IDBRequest<IDBCursor | null>;
supports: (method: string) => boolean;
openCursor(range?: IDBQuery, direction?: IDBCursorDirection | undefined): IDBRequest<IDBCursorWithValue | null>;
openKeyCursor(range?: IDBQuery, direction?: IDBCursorDirection | undefined): IDBRequest<IDBCursor | null>;
supports(method: string): boolean;
keyPath: string | string[];
get: (key: IDBValidKey | IDBKeyRange) => IDBRequest<T | null>;
getKey: (key: IDBValidKey | IDBKeyRange) => IDBRequest<IDBValidKey | undefined>;
get(key: IDBValidKey | IDBKeyRange): IDBRequest<T | null>;
getKey(key: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey | undefined>;
}
export class QueryTarget<T> {