-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Converted webpack-compilation-hash javascript file to typescript #23439
Converted webpack-compilation-hash javascript file to typescript #23439
Conversation
|
||
export const webpackCompilationHashReducer = ( | ||
state: IGatsbyState["webpackCompilationHash"] = ``, | ||
action: ISetWebpackCompilationHashAction |
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.
this should be ActionsUnion
as every reducer gets called for dispatches of any type.
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.
This is great! If you make the one small change I'll merge it! 🎉
Also you need to merge in master as we have conflicts |
The conflicts were in redux/reducers/index and redux/types.
…on` in redux/types. Also, `ActionsUnion` is now set as `webpackCompilationHashReducer`'s `action` parameter type.
@blainekasten Sounds good! I just merged in master, resolved the conflicts, and added |
@@ -14,6 +14,7 @@ Since 2015 Serverless has been providing a platform to unify all the tools softw | |||
Any new front-end technologies had to mesh well with the existing site’s architecture. “The Serverless site has a blog and a documentation section, both of which pull Markdown files from GitHub repositories,” says Narayan. “We needed a way to pull those Markdown files while still maintaining a very fluent experience for the content contributors.” | |||
|
|||
## Ready to (re)launch with Gatsby 🚀 | |||
|
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.
Prettier was throwing errors for missing the line breaks that are added here. @blainekasten Let me know if you'd like me to remove them.
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.
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! 💜
Holy buckets, @chrisq21 — we just merged your PR to Gatsby! 💪💜 Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! |
Description
Converts
gatsby/src/redux/reducers/webpack-compilation-hash.js
to Typescript asgatsby/src/redux/reducers/webpack-compilation-hash.ts
.Added an interface called
ISetWebpackCompilationHashAction
ingatsby/src/redux/types.ts
.Updated
gatsby/src/redux/reducers/index.js
to pull inwebpackCompilationHashReducer
withimport
instead ofrequire
Related Issues
Related to the Typescript migration efforts #21995