Skip to content

TS2707 [ERROR]: Generic type 'RouterContext<R, P, S>' requires between 1 and 3 type arguments #465

@finlaydotb

Description

@finlaydotb

Upgrading from version 6.5.0 to 10.2.0 now give the following compile error:

TS2707 [ERROR]: Generic type 'RouterContext<R, P, S>' requires between 1 and 3 type arguments

so for example the following code does not compile anymore:

router.get("/", isAuthed, indexHandler)
router.get("/index", isAuthed, indexHandler)
export const indexHandler = async (ctx: RouterContext) => {
...
}

I could not find any thing in the documentation about what changes with RouterContext and how to use it now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions