Closed
Description
Trying to add in Express 4.x middleware:
import { Receiver, CloudEvent } from "cloudevents";
const receivedEvent: CloudEvent = Receiver.accept(req.headers, req.body);
It fails with:
(property) IncomingMessage.headers: IncomingHttpHeaders
Argument of type 'IncomingHttpHeaders' is not assignable to parameter of type 'Headers'.
Index signatures are incompatible.
Type 'string | string[]' is not assignable to type 'string'.
Type 'string[]' is not assignable to type 'string'.ts(2345)
Metadata
Metadata
Assignees
Labels
No labels