Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion spec/v2/providers/https.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ import * as options from "../../../src/v2/options";
import * as https from "../../../src/v2/providers/https";
import { expectedResponseHeaders, MockRequest } from "../../fixtures/mockrequest";
import { runHandler } from "../../helper";
import { expectType } from "../../common/metaprogramming";
import { FULL_ENDPOINT, MINIMAL_V2_ENDPOINT, FULL_OPTIONS, FULL_TRIGGER } from "./fixtures";
import { onInit } from "../../../src/v2/core";
import { Handler } from "express";
import { Handler, Response as ExpressResponse } from "express";
import { genkit } from "genkit";
import {
clearParams,
Expand Down Expand Up @@ -823,3 +824,10 @@ describe("onCallGenkit", () => {
https.onCallGenkit(flow);
});
});

describe("Response", () => {
it("re-exports the express Response type along with its type parameters", () => {
expectType<ExpressResponse<{ ok: boolean }>>({} as https.Response<{ ok: boolean }>);
expectType<https.Response<{ ok: boolean }>>({} as ExpressResponse<{ ok: boolean }>);
});
});
1 change: 1 addition & 0 deletions src/v2/providers/https.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import { withInit } from "../../common/onInit";
import * as logger from "../../logger";

export type { Request, CallableRequest, CallableResponse, FunctionsErrorCode };
export type { Response } from "express";
export { HttpsError };

/**
Expand Down
Loading