Skip to content

Conversation

@Convly
Copy link
Member

@Convly Convly commented May 30, 2022

What does it do?

Add generic typings for schemas and attributes.

Why is it needed?

This is the first step to adding more and more typings to the core Strapi elements.

⚠️ This PR has been developed using Typescript 4.7.

VSCode hasn't released a compatible version of its editor yet (it should be out very early June 2022). In the meantime, please consider using VSCode insider to test this branch. For more information/context, please see this comment

The topic mentioned above is no longer true as the 4.7 parts of the code have been moved to another PR that will be merged later once TS 4.7 will be more available in the ecosystem

@Convly Convly requested review from Bassel17 and alexandrebodin May 30, 2022 12:36
@Bassel17
Copy link
Member

it seems we also have some unit tests failing but it doesn't seem to be related to this PR, the same tests are failing on features/typescript

@Convly Convly mentioned this pull request Jun 1, 2022
@codecov
Copy link

codecov bot commented Jun 1, 2022

Codecov Report

Merging #13416 (40875d4) into features/typescript (bdb5a3e) will increase coverage by 5.40%.
The diff coverage is n/a.

@@                   Coverage Diff                   @@
##           features/typescript   #13416      +/-   ##
=======================================================
+ Coverage                48.83%   54.23%   +5.40%     
=======================================================
  Files                      259     1217     +958     
  Lines                     9115    30804   +21689     
  Branches                  2036     5597    +3561     
=======================================================
+ Hits                      4451    16706   +12255     
- Misses                    3839    12261    +8422     
- Partials                   825     1837    +1012     
Flag Coverage Δ
front 56.50% <ø> (?)
unit 48.83% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/core/upload/admin/src/hooks/useUpload.js 54.83% <0.00%> (ø)
...min/src/components/ConfigurationsProvider/index.js 100.00% <0.00%> (ø)
...aManagerProvider/utils/retrieveNestedComponents.js 100.00% <0.00%> (ø)
...ntent-manager/pages/EditView/Informations/index.js 100.00% <0.00%> (ø)
.../content-manager/components/SelectWrapper/index.js 23.30% <0.00%> (ø)
...njectedComponents/CMEditViewLocalePicker/Bullet.js 0.00% <0.00%> (ø)
...ager/pages/ListSettingsView/components/Settings.js 74.28% <0.00%> (ø)
...ugins/i18n/admin/src/components/ModalEdit/index.js 0.00% <0.00%> (ø)
...-permissions/admin/src/hooks/usePlugins/reducer.js 100.00% <0.00%> (ø)
...ontent-manager/pages/ListSettingsView/utils/api.js 80.00% <0.00%> (ø)
... and 948 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bdb5a3e...40875d4. Read the comment docs.

@Convly Convly marked this pull request as ready for review June 3, 2022 14:45
@Convly Convly changed the title Typescript - Add generic typings for schemas [TS] Add generic typings for schemas Jun 3, 2022
Copy link
Member

@alexandrebodin alexandrebodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job it starting to take form 👍

Copy link
Member

@alexandrebodin alexandrebodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Convly Convly merged commit 0a6b6e4 into features/typescript Jul 4, 2022
@Convly Convly deleted the typescript/types/schema branch July 4, 2022 07:32
@strapi-bot
Copy link

This pull request has been mentioned on Strapi Community Forum. There might be relevant details there:

https://forum.strapi.io/t/strapi-second-beta-release-for-v-4-3-0/20170/1

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.

5 participants