Skip to content

Commit 2988f9e

Browse files
committed
Add count methods to the Model types
1 parent 9f0c137 commit 2988f9e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/service-module/types.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,17 @@ export interface ModelStatic extends EventEmitter {
246246
*/
247247
findInStore<M extends Model = Model>(params?: Params): Paginated<M>
248248

249+
/**
250+
* A proxy for the `count` action
251+
* @param params Find params
252+
*/
253+
count<M extends Model = Model>(params?: Params): Promise<M[] | Paginated<M>>
254+
/**
255+
* A proxy for the `count` getter
256+
* @param params Find params
257+
*/
258+
countInStore<M extends Model = Model>(params?: Params): Paginated<M>
259+
249260
/**
250261
* A proxy for the `get` action
251262
* @param id ID of record to retrieve

0 commit comments

Comments
 (0)