Skip to content

Commit

Permalink
fix(ext/node): export request and response clases from http2 module (
Browse files Browse the repository at this point in the history
…#25592)

Closes #20612
Closes #23326

This makes `qwik` work.
  • Loading branch information
bartlomieju authored Sep 12, 2024
1 parent 3285801 commit 46d5f38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/node/polyfills/http2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2295,7 +2295,7 @@ function onStreamTimeout(kind) {
};
}

class Http2ServerRequest extends Readable {
export class Http2ServerRequest extends Readable {
readableEnded = false;

constructor(stream, headers, options, rawHeaders) {
Expand Down Expand Up @@ -2523,7 +2523,7 @@ function isConnectionHeaderAllowed(name, value) {
value === "trailers";
}

class Http2ServerResponse extends Stream {
export class Http2ServerResponse extends Stream {
writable = false;
req = null;

Expand Down
5 changes: 5 additions & 0 deletions tests/unit_node/http2_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,3 +378,8 @@ Deno.test("[node/http2 client] connection states", async () => {

assertEquals(actual, expected);
});

Deno.test("request and response exports", () => {
assert(http2.Http2ServerRequest);
assert(http2.Http2ServerResponse);
});

0 comments on commit 46d5f38

Please sign in to comment.