Skip to content
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

chore(gatsby): Migrate utils/page-data to TypeScript #23991

Merged
merged 6 commits into from
Jun 16, 2020

Conversation

hiwelo
Copy link
Contributor

@hiwelo hiwelo commented May 11, 2020

Description

This commit migrates the existing src/utils/page-data.ts file to TypeScript by trying to stick as close as possible to the original JavaScript file.

To take advantage of existing Redux typings, I tried to extend the typings from the IGatsbyPage interface describing page data.

Related Issues

Related to #21995

@hiwelo hiwelo requested a review from a team as a code owner May 11, 2020 22:00
@hiwelo hiwelo self-assigned this May 11, 2020
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 11, 2020
@hiwelo hiwelo added type: TypeScript migration and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels May 11, 2020
@hiwelo
Copy link
Contributor Author

hiwelo commented May 11, 2020

@blainekasten I had to open a new PR because of the deletion of the fork few days ago 🙄 Sorry for that.
I implemented all requested changes (limited the usage of TS generics, updated the props of each function to remove the previous usage of objects when possible), please let me know if there is anything else.

This commit migrates the existing `src/utils/page-data.ts` file to
TypeScript by trying to stick as close as possible to the original
JavaScript file.

To take advantage of existing Redux typings, I tried to extend the
typings from the `IGatsbyPage` interface describing page data.
@hiwelo hiwelo force-pushed the ts-migration/utils-page-data branch from b2696ca to cdde8c8 Compare May 11, 2020 22:32
@hiwelo hiwelo added the status: needs core review Currently awaiting review from Core team member label May 15, 2020
Copy link
Contributor

@blainekasten blainekasten left a comment

Choose a reason for hiding this comment

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

This looks great to me, let's merge it!

Thank you so much for contributing to our TypeScript refactor! We have more work to do and we would love to have you stay involved in our transition. Please submit more PRs! 💜

@blainekasten blainekasten merged commit a6ef610 into master Jun 16, 2020
@delete-merged-branch delete-merged-branch bot deleted the ts-migration/utils-page-data branch June 16, 2020 20:25
axe312ger pushed a commit that referenced this pull request Jun 23, 2020
* chore(gatsby): Migrate utils/page-data to TypeScript

This commit migrates the existing `src/utils/page-data.ts` file to
TypeScript by trying to stick as close as possible to the original
JavaScript file.

To take advantage of existing Redux typings, I tried to extend the
typings from the `IGatsbyPage` interface describing page data.

* Improve function naming

* convert to functions

* update yarn.lock

* skip typechecking gatsby-admin

Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs core review Currently awaiting review from Core team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants