-
Notifications
You must be signed in to change notification settings - Fork 182
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Node.js version: v22.21.1
OS version: Linux manjaro 6.12.61-1-MANJARO
Description: Default export is now a constructor, can not use generics anymore.
import type Router from '@koa/router';
// same for `import type { Router } from '@koa/router';`
// this does not work anymore
type MyRouter = Router<AppState, AppContext>;Actual behavior
// ■ 'Router' refers to a value, but is being used as a type here. Did you mean 'typeof Router'?
type AppRouter = Router<DefaultState, DefaultContext>; Expected behavior
Code to reproduce
Checklist
- [ x] I have searched through GitHub issues for similar issues.
- [x ] I have completely read through the README and documentation.
- [x ] I have tested my code with the latest version of Node.js and this package and confirmed it is still not working.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working