Skip to content

Commit bb48cdc

Browse files
committed
fix: Type of parsedBody
1 parent 5adbb01 commit bb48cdc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/server/sse.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ export class SSEServerTransport implements Transport {
6868
async handlePostMessage(
6969
req: IncomingMessage,
7070
res: ServerResponse,
71-
parsedBody?: unknown,
71+
parsedBody?: {[key: string]: unknown},
7272
): Promise<void> {
7373
if (!this._sseResponse) {
7474
const message = "SSE connection not established";
7575
res.writeHead(500).end(message);
7676
throw new Error(message);
7777
}
7878

79-
let body: string | unknown;
79+
let body: string | typeof parsedBody;
8080
try {
8181
const ct = contentType.parse(req.headers["content-type"] ?? "");
8282
if (ct.type !== "application/json") {

0 commit comments

Comments
 (0)