1 | import {makeOptionsDecorator, IModel,MetadataPropertyDecoratorFactory} from 'typestore'
|
2 | import {IndexedDBFinderKey} from "./IndexedDBConstants";
|
3 | import {IndexedDBRepoPlugin} from './IndexedDBRepoPlugin'
|
4 |
|
5 | export type IndexedDBFinderFn = <M extends IModel>(repo:IndexedDBRepoPlugin<M>, ...args:any[]) => Promise<M[]>
|
6 |
|
7 | export interface IIndexedDBFinderOptions {
|
8 | fn?:IndexedDBFinderFn
|
9 | singleResult?:boolean
|
10 | filter?: (o:any,...args:any[]) => boolean
|
11 | }
|
12 |
|
13 | export const IndexedDBFinderDescriptor =
|
14 | makeOptionsDecorator<IIndexedDBFinderOptions>(IndexedDBFinderKey)
|