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 called koa-router with 4.7k stars on github which looks to be the same thing. However when installing types with npm i @types/koa-router the declarations only work if i use koa-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?) package koa-router
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-routerwith 4.7k stars on github which looks to be the same thing. However when installing types withnpm i @types/koa-routerthe declarations only work if i usekoa-routerand not@koa/routerSo 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-routerto work for@koa/routerActual Behavior:
@types/koa-routerworks for the (3rd party?) packagekoa-router