Minimal structural stand-ins for the Express types this middleware touches.
Express is only a peer/dev dependency, so it is deliberately kept out of the
published type graph. Importing Request/Response/RequestHandler from
express here would make the generated declaration file reach back into
untranspiled TypeScript source in the JSR npm tarball, breaking every
/server consumer — including ones that never touch Express (see
#128). The sibling Next.js
and Lambda middleware already declare their own local types for the same
reason. These interfaces are structurally compatible with Express 4 and 5, so
createExpressWebhookHandler(...) still drops straight into
app.post(path, handler) with full type-checking.
Minimal structural stand-ins for the Express types this middleware touches.
Express is only a peer/dev dependency, so it is deliberately kept out of the published type graph. Importing
Request/Response/RequestHandlerfromexpresshere would make the generated declaration file reach back into untranspiled TypeScript source in the JSR npm tarball, breaking every/serverconsumer — including ones that never touch Express (see #128). The sibling Next.js and Lambda middleware already declare their own local types for the same reason. These interfaces are structurally compatible with Express 4 and 5, socreateExpressWebhookHandler(...)still drops straight intoapp.post(path, handler)with full type-checking.