Skip to content

Upgrade @koa/router (breaking change) with v7 #1817

@jeengbe

Description

@jeengbe

@koa/router@15 now ships its own types, which are incompatible with @types/koa__router.

@types/[email protected]:

declare namespace Router {
  // ...
}

export = Router;

@koa/[email protected]:

export { /* ... */ R as Router,  /* ... */  R as default } from './layer.mjs';

The code generated by the koa template does not work with the new types, so we should upgrade the import to import type { Router as KoaRouter} from '@koa/router'; - a breaking change that we can sneak in with v7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions