feathers
feathers copied to clipboard
fix(feathers): Paginated<Result> for ServiceMethods.find
The ReturnType of ServiceMethods['find'] was Promise<Result | Result[]>. The correct way is Promise<Paginated<Result> | Result[]>.
I also added it to ServiceOverloads.
@daffl: I'm stuck with the error. The service OAuthService in @feathersjs/authentication-oauth does not follow the common service definition. OAuthService['find'] returns Promise<GrantResponse>.
It has to follow the common service definition, which should be Promise<Paginated<R> | R[]>. That is what the current error is about.
see
Pipeline:
and Code:
How to continue?
- use @ts-ignore to move on?
- make
OAuthService['find']to return an array or a paginated result? - rename
findofOAuthServiceto anything else?
I'm not sure if we can add the pagination options to the main interface - I believe that's the error that is happening since any service interface implementor now expects the pagination overloads to be implement.