-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Type System v1 #16917
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
Type System v1 #16917
Conversation
Co-authored-by: Simone <simone.taeggi@strapi.io> Co-authored-by: Christian <christiancp100@gmail.com> Co-authored-by: Bassel Kanso <basselkanso82@gmail.com> Co-authored-by: Ben Irvin <innerdvations@users.noreply.github.com>
Co-authored-by: Simone <simone.taeggi@strapi.io> Improve types for controllers and services
Co-authored-by: Ben Irvin <ben@innerdvations.com>
Co-authored-by: Ben Irvin <ben@innerdvations.com>
Co-authored-by: Ben Irvin <ben@innerdvations.com>
Co-authored-by: Ben Irvin <ben@innerdvations.com>
Co-authored-by: Ben Irvin <ben@innerdvations.com>
…rapi into ts-support/controllers
Co-authored-by: Ben Irvin <ben@innerdvations.com>
…ible with Attribute.Any
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!
|
This pull request has been mentioned on Strapi Community Forum. There might be relevant details there: https://forum.strapi.io/t/typescript-schema-generation-and-usage/29755/2 |
|
This pull request has been mentioned on Strapi Community Forum. There might be relevant details there: |
What does it do?
Initialize a new type system for Strapi
Initialize modules and namespaces to export core types and utilities from Strapi.
Core types include the basic building blocks used to create powerful APIs:
Updated the type generator to match the type system
Updated the data transfer package to use the created types
Why is it needed?
In order to provide a better TS developer experience for Strapi users, we need to rely on solid foundations.
The goal of this type system is to act both as a toolbelt and a set of conventions for TypeScript adoption throughout the codebase.
While this is only the first version of this type system and while it should be treated as an experimental release (things might change regarding type definitions in the coming months), it should set a clear objective related to our ambitions with TypeScript.
How to test it?
cd examples/getstartedyarn run strapi ts:generate-typestypes/shared/registries/component.d.tsandtypes/shared/registries/contentTypes.d.tsand should contain type definition and dynamic registries augmentationeg:
Related issue(s)/PR(s)
Let us know if this is related to any issue/pull request