rgommezz/react-native-offline

Rewrite the library using TypeScript #202

rgommezz posted onGitHub

Remove flow typings in favour of TypeScript.

Prerequisites

Summary

  • TypeScript setup with linting and compiler steps
  • Rewrite the library to be 100% statically typed
  • Export type definitions to consumers of the library

@issuehunt has funded $300.00 to this issue.


posted by IssueHuntBot over 5 years ago

@rgommezz Started working on this!

posted by guilhermetelles over 5 years ago

Hey @guillhermegts, appreciate your commitment!

However, make sure to look at the assignees before tackling any issue to avoid wasting your time. You are lucky I haven't started yet 😅.

I am happy to hand it over to you. However, I am hoping you understand what is required to complete this task.

If you have previous experience with all the steps required for typing libraries with TypeScript, then definitely there are no much pointers required.

Otherwise, you would have to stick to these guidelines, which could be a burden for unexperienced or beginners in the world of TypeScript. If that's the case, I wouldn't then recommend this issue to avoid future frustration.

Looking forward to hearing from you!

posted by rgommezz over 5 years ago

@rgommezz sorry about that, my mistake! If you really wouldn't mind, I would like to give this issue a try.

I've been working with typescript since December and i'm looking to get more involved in the community, I figured this issue would be a good place to start and get more experience in TS. I have no problem in sticking to the guidelines.

I have a few hours per week available, but if you need this in a hurry just give me shout and I'll give it back to you.

Cheers

posted by guilhermetelles over 5 years ago

That's great, then I'll assign it to you.

And don't you worry, there is no rush at all, you can take all the time you need :)

Cheers mate!

posted by rgommezz over 5 years ago

Is this happening?

posted by ankeetmaini over 5 years ago

Hey @guilhermetelles, any updates?

If you find yourself with no time, please do let me know and we can see if someone else is interested on taking it over.

Thanks!

posted by rgommezz over 5 years ago

As a matter of fact I started converting to TS just to learn this awesome codebase. #215. I'll close it and work on my own fork if significant portions are already done for this issue. Thanks!

posted by ankeetmaini over 5 years ago

As a matter of fact I started converting to TS just to learn this awesome codebase. #215. I'll close it and work on my own fork if significant portions are already done for this issue. Thanks!

Added a review.

My main concern, however, is that the library needs to update deprecated react-native-netinfo part within NetworkConnectivity

posted by ddzirt over 5 years ago

And update to keep up with react-native-netinfo will showcase that we have a complete mess of types. Without them, we just have 2 or 3 same types. That State and NetworkState, but if we do update, we will come to the conclusion that we need to pass NetInfoState from react-native-netinfo instead of our custom type, or, to keep up the redux stuff, we would need to enhance it with something like:

interface NetworkState extends NetInfoState {
  actionQueue: properActionType[],
}

Also, switching to hooks could be done as well, but that would pose a different set of questions.

posted by ddzirt over 5 years ago

@ddzirt I think upgrading react-native-netinfo is a separate activity and I can take it up right after this. But I'd like this to be done first and bring this branch at par with master as once we've a solid base with types we can easily refactor.

posted by ankeetmaini over 5 years ago

@ankeetmaini that is true, but do keep it in mind, since it will be a bit more than just types.

posted by ddzirt over 5 years ago

Any updates on this?

posted by MakhouT over 5 years ago

@MakhouT you can see the progress on #215 and see this comment

posted by ankeetmaini over 5 years ago

@ankeetmaini Thanks! Seems I've missed those!

posted by MakhouT over 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

posted by stale[bot] about 5 years ago

any update on this ?

posted by blazk0 about 5 years ago

@rgommezz has rewarded $210.00 to @ankeetmaini. See it on IssueHunt

  • :moneybag: Total deposit: $300.00
  • :tada: Repository reward(20%): $60.00
  • :wrench: Service fee(10%): $30.00
posted by issuehunt-app[bot] almost 5 years ago

Fund this Issue

$300.00
Rewarded

Rewarded pull request

Recent activities

ankeetmaini was rewarded by rgommezz for rgommezz/react-native-offline# 202
almost 5 years ago
rgommezz submitted an output to  rgommezz/ react-native-offline# 202
almost 5 years ago