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

Add a lib def for @koa/router #3608

Merged
merged 1 commit into from
Oct 29, 2019

Conversation

julienw
Copy link
Contributor

@julienw julienw commented Oct 22, 2019

Other notes:
I copied most of it from koa-router; indeed this npm module has been forked and renamed because the original was unmaintained.
I only kept the version for "v0.104-" but adapted it to make it work with some earlier flow versions, which is simpler if we don't want to support versions of flow earlier than v0.84.
Also I added the newest additions (there's a new parameter in the url method).
Lastly I kept most tests but reorganized them with describe and it, as well as added new ones.

Tell me what you think!

@@ -0,0 +1,119 @@
type KoaRouter$Middleware = (
Copy link
Member

Choose a reason for hiding this comment

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

Any reason to keep those outside of the module definition block?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No reason really, as I wrote in the description, I mostly copied a previously existing definition and didn't want to redo everything :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please tell me if you'd like that I revisit this to merge it.

Copy link
Member

Choose a reason for hiding this comment

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

I would personally just declare/export them inside the module scope, without the prefix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@pascalduez pascalduez merged commit 4486f05 into flow-typed:master Oct 29, 2019
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.

None yet

2 participants