-
Notifications
You must be signed in to change notification settings - Fork 176
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
@koa/router vs koa-router confusion #109
Comments
Hi @linde12 This module is forked from the original koa-router due to its lack of activity, and this repository is now the official version. Install with To address your typescript issues try @tpes/koa__router. I believe this package contains the type definitions you are looking for. Haven't used typescript myself so haven't tried it myself sorry. Hope this helps 😄 |
Ah, i see! I will try the @types/koa__router package. Closing the issue, thank you! |
[Saves folks time from having to dig through old issues](koajs#109)
[Saves folks time from having to dig through old issues](#109)
Hi.
I'm trying out Koa and i wanted to get started with a simple crud app with a couple of routes but quickly ran into problems. There is a package on npm,
@koa/router
, which is under koajs/router here on Github, but there is also a package calledkoa-router
with 4.7k stars on github which looks to be the same thing. However when installing types withnpm i @types/koa-router
the declarations only work if i usekoa-router
and not@koa/router
So the question is: which package is the "official" one, and does it also have typescript definitions (& if so how do i use/install them)? This is very confusing and unfortunately also very off-putting to someone new to the ecosystem, so i'm curious to why or if im doing something very wrong.
Expected Behavior:
@types/koa-router
to work for@koa/router
Actual Behavior:
@types/koa-router
works for the (3rd party?) packagekoa-router
The text was updated successfully, but these errors were encountered: