I'd expect to be able to pass the necessary paginate options without facing typescript errors. It's not clear to me why only the max option would be allowed, since pagination requires default to be set in order to return paginated results.
Type '{ default: number; max: number; }' is not assignable to type 'false | Pick<PaginationOptions, "max"> | undefined'.
Object literal may only specify known properties, and 'default' does not exist in type 'Pick<PaginationOptions, "max">'.ts(2322)
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working):
Feathers Dove (5.0.1)
typescript@4.9.5
Steps to reproduce
Expected behavior
I'd expect to be able to pass the necessary paginate options without facing typescript errors. It's not clear to me why only the
max
option would be allowed, since pagination requiresdefault
to be set in order to return paginated results.This behavior is expected because of the documentation at https://feathersjs.com/api/databases/common.html#pagination, which indicates that
params.paginate
can be overriden as shown above.Actual behavior
I get the following typescript error:
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working): Feathers Dove (5.0.1) typescript@4.9.5