Skip to content

Commit 866f8ef

Browse files
committed
Updated to support implementation-specific Response type in Reponse hook
1 parent 1d08cd1 commit 866f8ef

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

test/__snapshots__/index.spec.js.snap

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ exports[`v2 should generate: ./test/generated/v2/core/OpenAPI.ts 1`] = `
5757
"/* istanbul ignore file */
5858
/* tslint:disable */
5959
/* eslint-disable */
60+
61+
type ResponseImplementation = Response;
62+
63+
64+
6065
type Resolver<T> = () => Promise<T>;
6166
type Headers = Record<string, string>;
6267

@@ -71,7 +76,7 @@ export interface RequestHookParams {
7176
export interface ResponseHookParams {
7277
url: string;
7378
result: ApiResult;
74-
response?: any;
79+
response?: ResponseImplementation;
7580
}
7681

7782
type Config = {
@@ -2326,6 +2331,11 @@ exports[`v3 should generate: ./test/generated/v3/core/OpenAPI.ts 1`] = `
23262331
"/* istanbul ignore file */
23272332
/* tslint:disable */
23282333
/* eslint-disable */
2334+
2335+
type ResponseImplementation = Response;
2336+
2337+
2338+
23292339
type Resolver<T> = () => Promise<T>;
23302340
type Headers = Record<string, string>;
23312341

@@ -2340,7 +2350,7 @@ export interface RequestHookParams {
23402350
export interface ResponseHookParams {
23412351
url: string;
23422352
result: ApiResult;
2343-
response?: any;
2353+
response?: ResponseImplementation;
23442354
}
23452355

23462356
type Config = {

0 commit comments

Comments
 (0)