-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Add basic typings for the global strapi class #13281
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
Conversation
|
Note: In the future, we'll work on providing types for more layers & will start to replace the "unknown" typings with more explicit ones. |
Codecov Report
@@ Coverage Diff @@
## features/typescript #13281 +/- ##
=======================================================
- Coverage 48.23% 48.20% -0.04%
=======================================================
Files 245 251 +6
Lines 8782 8954 +172
Branches 1960 2008 +48
=======================================================
+ Hits 4236 4316 +80
- Misses 3735 3820 +85
- Partials 811 818 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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/strapi-v4-2-0-fourth-beta-for-typescript-support/18869/1 |
What does it do?
Add a first basis for the Strapi class typings. This is only the first iteration and it is likely to evolve in the next beta releases.
Why is it needed?
Without proper typings, using Strapi with TS is hard and doesn't make a lot of sense.
How to test it?
Create a typescript project and try using the Strapi type exported from
@strapi/strapi