You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been playing around with Feathers Dove V5 in order to see the implications of upgrading from v4 and have stumbled upon this typescript Error while customizing the sequelize adapter.
When I create a new Sequelize Service and overwrite find method and call super.find(params), I get a type error because
the type of super.find is Promise<User[] | Paginated>
the type of the Sequelize adapter find function is 'PaginatedOrArray<User, P>'
Ideally, params and result types should be overwritten and be compatible with PaginatedOrArray
Actual behavior
The text was updated successfully, but these errors were encountered:
chrisbag
changed the title
feathers sequlize type confict when calling super.find
feathers sequlize type confict when overwritting find and calling super.find
Apr 3, 2024
Find the solution in the docs for those who might stumble onto that issue
When overriding an existing [service method](https://feathersjs.com/api/services.html#service-methods) on a database adapter the method and overload signatures have to match. The following example shows how to override every service method. Only the methods you want to customize have to be added. https://feathersjs.com/guides/cli/service.class
Steps to reproduce
Hello,
I have been playing around with Feathers Dove V5 in order to see the implications of upgrading from v4 and have stumbled upon this typescript Error while customizing the sequelize adapter.
When I create a new Sequelize Service and overwrite find method and call super.find(params), I get a type error because
Expected behavior
Ideally, params and result types should be overwritten and be compatible with PaginatedOrArray
Actual behavior
The text was updated successfully, but these errors were encountered: