Skip to content

Add correct type safety to orderBy#64

Open
SH-Exact wants to merge 3 commits intomasterfrom
type_safe_orderBy
Open

Add correct type safety to orderBy#64
SH-Exact wants to merge 3 commits intomasterfrom
type_safe_orderBy

Conversation

@SH-Exact
Copy link
Copy Markdown
Contributor

@SH-Exact SH-Exact commented Apr 16, 2026

This PR completes the type safety of OrderBy by not taking the entity props as reference, but the properties of the *_Filter_Props types. Since the types can become pretty complex, which can break typescript, the syntax was changed from a . notation to a object definition as used for the include parameter, e.g.

wServices.article.some({
  orderBy: [
    {
      FIELD: {
        articleCategory: {
          name: true
        }
      }
    }
  ]
});

The README.md was adapted correspondingly.

@SH-Exact SH-Exact marked this pull request as draft April 17, 2026 09:06
@SH-Exact SH-Exact marked this pull request as ready for review April 17, 2026 14:17
@SH-Exact SH-Exact self-assigned this Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant