-
Notifications
You must be signed in to change notification settings - Fork 13
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
Fix up express()
return type
#19
Conversation
Modifying the prototype is part of middleware in Express, that's how it accepts raw HTTP.
6d0fc21
to
1d417aa
Compare
Are you sure that |
Yes, definitely. Express is designed to accept the raw HTTP objects and alters them to add Express.js-specifics. See https://github.com/expressjs/express/blob/bd47aeb88d28c6cff6e2d8e5378ec73c262e039f/lib/express.js#L37-L39 for the handler code, then https://github.com/expressjs/express/blob/bd47aeb88d28c6cff6e2d8e5378ec73c262e039f/lib/application.js#L157-L174 which is the |
Is this going to merged into master? |
Sorry, forgot about this. @blakeembrey I assume the node typings are outdated by now again, but LGTM otherwise. |
@felixfbecker Since it's a global and the types are used correctly, it won't be a problem. |
Txs for merging, I just installed it and then did:
And there is no
So I'm a little confused, why is Is info
But why is there only one version I would have expected there to be at least Should |
Those fields are defined on the registry itself. Usually reserved for information about the definition vs a regular description of the interface, but I don't think anyone uses it (except once). The versions listed from Typings is also all the current definitions in the registry, the old ones continue working but they are hidden behind a deprecated flag - it'd be a bit annoying seeing every change ever merged so we just show the currently listed registry versions. |
As a user how do I know if I have the latest version of a particular module and which repo it came from? |
In the snippet you pasted above, see the location. |
Needing to use |
What if different versions are from different repos? What about showing the commit, which might be different across versions? I don't see the issue with the current approach considering most people don't really care where it's from and Typings is in maintenance mode since TypeScript has |
I didn't realize Typings is in maintenance mode. Do you use I ask because
|
@felixfbecker so it looks like someday, maybe sooner maybe later, this will be fixed :( In the meantime which would you recommend I use, the versions of |
I'm still going to maintain Typings while people are using it, but I'm not going to promote it over the official solution TypeScript has created. See #14 for information on that point - we still can't publish anything to NPM unfortunately (which is why I haven't officially deprecated Typings yet). |
Modifying the prototype is part of middleware in Express, that's how it accepts raw HTTP.
Closes #18.
@felixfbecker I tried to make the minimal amount of changes, the description of why is in the linked repo 😄 If this makes sense, feel free to merge and update the registry, hoping to use these changes soon because I've been messing around with refactoring the underlying HTTP layer.