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

Channel queues flowtyped #64

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Channel queues flowtyped #64

wants to merge 4 commits into from

Conversation

beaucollins
Copy link
Contributor

@beaucollins beaucollins commented Mar 7, 2018

Extracts and flowtypes the Queue classes from Channel.

  • 100% flowtyped
  • remove EventEmitter
  • 100% docblocks

No application logic is changed other than adding some null checks where flow complains (rightfully so).

The GhostStore type is currently located in the LocalQueue module because it is the only one using that type definition at this moment. It will need a better home when the Channel module gets flowtyped but I think we can cross that bridge when we tackle the Channel changes.

* @param {Number} version - version of ghost data
* @param {Object} data - object literal to save as this ghost's data for this version
* @returns {Promise<Ghost>} - the ghost for this object
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

what's going on here? are these missing or is the JSDoc comment supposed to indicate that the functions exist?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The functions appear to be missing. I think this is the only Flow typed file that tries to use a GhostStore and the only method it needs is GhostStore.get.

Once this interface is moved to the proper location (a Flow typed Bucket or Channel module perhaps) the missing interface methods would have failed the type checker.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ha, I event wrote as much over a year ago:

The GhostStore type is currently located in the LocalQueue module because it is the only one using that type definition at this moment. It will need a better home when the Channel module gets flowtyped but I think we can cross that bridge when we tackle the Channel changes.

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.

2 participants