Skip to content

Commit

Permalink
chore: fix type issue with unenv
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Sep 26, 2023
1 parent d18f56b commit 498a540
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/adapters/plain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
setResponseStatus,
splitCookiesString,
} from "../utils";
import { IncomingMessage } from "node:http";

Check failure on line 13 in src/adapters/plain.ts

View workflow job for this annotation

GitHub Actions / ci (16)

`node:http` import should occur before import of `unenv/runtime/node/http/_request`

Check failure on line 13 in src/adapters/plain.ts

View workflow job for this annotation

GitHub Actions / ci (18)

`node:http` import should occur before import of `unenv/runtime/node/http/_request`

Check failure on line 13 in src/adapters/plain.ts

View workflow job for this annotation

GitHub Actions / ci (20)

`node:http` import should occur before import of `unenv/runtime/node/http/_request`

export interface PlainRequest {
_eventOverrides?: Partial<H3Event>;
Expand Down Expand Up @@ -66,7 +67,7 @@ export async function _handlePlainRequest(app: App, request: PlainRequest) {

// Shim for Node.js request and response objects
// TODO: Remove in next major version
const nodeReq = new NodeIncomingMessage();
const nodeReq = new NodeIncomingMessage() as unknown /* unenv */ as IncomingMessage;
const nodeRes = new NodeServerResponse(nodeReq);

// Fill node request properties
Expand Down

0 comments on commit 498a540

Please sign in to comment.