Skip to content

Fix type information to allow express middlewares #146

Closed
@tobiasdiez

Description

@tobiasdiez

If you use an express-middleware (such as session or passport), one gets the following typescript error:

Type 'RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>' is not comparable to type 'EventHandler<any>'.

Example-code:

import session from 'express-session'
import passport from 'passport'
import { createApp } from 'h3'

const app = createApp()
app.use(session())
app.use(passport.initialize())

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