-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Entity Service types #17799
Conversation
Co-authored-by: christiancp100 <christian.capeans.perez@strapi.io>
Co-authored-by: Alexandre BODIN <alexandrebodin@users.noreply.github.com>
…api into types/entity-services/filters
…es/publication-state
…rapi/strapi into types/entity-service/data-param
Co-authored-by: Alexandre BODIN <alexandrebodin@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Changes regarding the initial scope
- factories have been reverted to an explicit any type for now to avoid breaking any application while we work around prototype typing issues
- Entities returned by the entity service are strongly typed (properties are narrowed based on given parameters) at the first level, but are keeping every fields for nested structures (relations, etc...)
The last two points will be worked on & shipped in later releases
we have some failing tests here |
…api into features/types/entity-service
Good improvements, but createCoreController and createCoreService types are unusable now (and gives typescript errors |
What does it do?
Improves and adds types for the Entity Service methods
TODO before release
Why is it needed?
So types are available when using the Entity Service
How to test it?
Entity Service methods should now be typed
Typescript testing framework has been added in this PR but the tests themselves are still in progress.
Related issue(s)/PR(s)