Skip to content

Pagination and query TypeScript improvements #2564

Closed

Description

@daffl

The current TypeScript related improvements in v5 are pretty solid but the following improvements should still be included:

  • Typed queries: This would allow to type params.query which will play well with the new schema types.
  • Inferred pagination: The return value for a find is currently Paginated<T>|T[] which means you always have to cast the result. We should find a way to either set a fixed find return value or infer it from the paginate settings.

Activity

  1. seonglae commented on Apr 19, 2022

    @seonglae

    Inferred pagination is needed for jsdoc which has no manual type casting

  2. daffl commented on Apr 23, 2022

    @daffl
    MemberAuthor

    @seonglae The way it is implemented in #2605 still allows both signatures so that should still be possible.

  3. added this to the v5 (Dove) milestone on Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions