-
Notifications
You must be signed in to change notification settings - Fork 300
Closed as not planned
Description
import fs from 'fs';
import { app } from './index.js';
import http2 from 'http2';
const options = {
key: fs.readFileSync('server.key'),
cert: fs.readFileSync('server.crt')
};
app.set('port', port);
const server = http2.createSecureServer(options, app);
Error:
server.ts:34:4 - error TS2345: Argument of type 'Express' is not assignable to parameter of type '(request: Http2ServerRequest, response: Http2ServerResponse<Http2ServerRequest>) => void'.
Types of parameters 'req' and 'request' are incompatible.
Type 'Http2ServerRequest' is not assignable to type 'IncomingMessage | Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'.
Type 'Http2ServerRequest' is missing the following properties from type 'Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>': get, header, accepts, acceptsCharsets, and 27 more.
34 }, app);
~~~
Metadata
Metadata
Assignees
Labels
No labels