feathersjs-ecosystem / feathers-sequelize

A Feathers service adapter for the Sequelize ORM. Supporting MySQL, MariaDB, Postgres, SQLite, and SQL Server
MIT License
208 stars 74 forks source link

Fix/update dependencies infer paginate params #418

Closed fratzinger closed 1 year ago

fratzinger commented 1 year ago

Problem:

I use the [key: string]: any hack for Params, as suggested in the migration guide:

declare module "@feathersjs/feathers" {
  interface Params {
    [key: string]: any;
  }
}

see: https://feathersjs.com/guides/migrating.html#typed-params-and-query

When doing this, the find params can not be inferred correctly and the function overloads do not work. By using conditional types the ReturnResult is correct.