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

Help wanted, conversion to TS #902

Closed
quantizor opened this issue Apr 5, 2023 · 6 comments · Fixed by #915
Closed

Help wanted, conversion to TS #902

quantizor opened this issue Apr 5, 2023 · 6 comments · Fixed by #915

Comments

@quantizor
Copy link
Contributor

quantizor commented Apr 5, 2023

Hi friends! As of this issue the repo is now ready and supporting migrating page and component files to use TypeScript. For the most part, this will involve:

  1. Renaming a file to us a ts or tsx extension (depending on the presence of JSX)

  2. Updating any imports if necessary

  3. Removing use of prop types in favor of function component argument defaults

  4. Adding a type signature to styled components that consume props, e.g.

styled.div<{ $color: string }>`
  color: ${p => p.$color || 'red'};
`

If you'd like to claim a file or folder, please comment on this thread to let other people know and start a PR! Thank you very much for helping out 😄

@quantizor quantizor pinned this issue Apr 5, 2023
@brnt-toast
Copy link
Contributor

I'll take a look this weekend

@redaktorscha
Copy link
Contributor

Hi, I'd love to help. I'm newbie but have got a little experience with the JS -> TS refactoring, done such task before. I'd love to try and start with something small if it's possible

@quantizor
Copy link
Contributor Author

Hi, I'd love to help. I'm newbie but have got a little experience with the JS -> TS refactoring, done such task before. I'd love to try and start with something small if it's possible

I'd say pick a file and follow the steps in the OP :)

@redaktorscha
Copy link
Contributor

Hi, I'd love to help. I'm newbie but have got a little experience with the JS -> TS refactoring, done such task before. I'd love to try and start with something small if it's possible

I'd say pick a file and follow the steps in the OP :)

Hi, I've picked 'Layout.ts' component and also 'media' and 'rem' utils that are related to this component. It's almost ready, but I'm not sure how to define properly inner parameter of the mobile func. Compiler shows no error for inner: RuleSet<any> but I'd love to get rid of any if possible. Could you give me a hint? ;-)

@quantizor
Copy link
Contributor Author

Hi, I'd love to help. I'm newbie but have got a little experience with the JS -> TS refactoring, done such task before. I'd love to try and start with something small if it's possible

I'd say pick a file and follow the steps in the OP :)

Hi, I've picked 'Layout.ts' component and also 'media' and 'rem' utils that are related to this component. It's almost ready, but I'm not sure how to define properly inner parameter of the mobile func. Compiler shows no error for inner: RuleSet<any> but I'd love to get rid of any if possible. Could you give me a hint? ;-)

Thanks for taking this on! :) I think ReturnType<typeof css> probably is good so it stays in sync with the API.

@redaktorscha
Copy link
Contributor

Hi, I'd love to help. I'm newbie but have got a little experience with the JS -> TS refactoring, done such task before. I'd love to try and start with something small if it's possible

I'd say pick a file and follow the steps in the OP :)

Hi, I've picked 'Layout.ts' component and also 'media' and 'rem' utils that are related to this component. It's almost ready, but I'm not sure how to define properly inner parameter of the mobile func. Compiler shows no error for inner: RuleSet<any> but I'd love to get rid of any if possible. Could you give me a hint? ;-)

Thanks for taking this on! :) I think ReturnType<typeof css> probably is good so it stays in sync with the API.

Thanks!
Tests have run ok. Made a PR.
Please msg me if it doesn't work for you or anything goes wrong ;-)
And I'm to ready to keep on working while (!currentJob)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants