marshallswain / feathers-pinia

Connect your Feathers API to the elegant data store for Vue
52 stars 22 forks source link

Wrong implementation of countInStore-Service-Method? #171

Open DarkTank2 opened 5 months ago

DarkTank2 commented 5 months ago

The type signature of the countInStore-service-method is

countInStore(params?: MaybeRef<SvcParams<Svc>>): Paginated<never>

src/create-pinia-service.ts line 179

Yet the implementation returns just a number, which equals to the total amount of records found. src/stores/local-queries.ts line 140 See especially line 148 where only the total of the result is returned instead of the paginated result.

So I think the signature schould either be changed to

countInStore(params?: MaybeRef<SvcParams<Svc>>): ComputedRef<number>

or the implementation of the method should be adapted so that it returns the paginated result and fits with the definition of the count-service-method.