Skip to content

Commit e728843

Browse files
committed
chore: update test snapshot
1 parent 67510bc commit e728843

397 files changed

Lines changed: 1042 additions & 637 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/client/client.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ export const createClient = (config: Config = {}): Client => {
204204

205205
for (const fn of interceptors.error.fns) {
206206
if (fn) {
207-
finalError = (await fn(error, response, request, options as any)) as unknown;
207+
finalError = (await fn(finalError, response, request, options as any)) as unknown;
208208
}
209209
}
210210

@@ -220,7 +220,7 @@ export const createClient = (config: Config = {}): Client => {
220220
: {
221221
error: finalError,
222222
request,
223-
response: response as any,
223+
response,
224224
};
225225
}
226226
};

packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/client/types.gen.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ export type RequestResult<
129129
) & {
130130
/** request may be undefined, because error may be from building the request object itself */
131131
request?: Request;
132-
response: Response;
132+
/** response may be undefined, because error may be from building the request object itself or from a network error */
133+
response?: Response;
133134
}
134135
>;
135136

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/client.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ export const createClient = (config: Config = {}): Client => {
204204

205205
for (const fn of interceptors.error.fns) {
206206
if (fn) {
207-
finalError = (await fn(error, response, request, options as any)) as unknown;
207+
finalError = (await fn(finalError, response, request, options as any)) as unknown;
208208
}
209209
}
210210

@@ -220,7 +220,7 @@ export const createClient = (config: Config = {}): Client => {
220220
: {
221221
error: finalError,
222222
request,
223-
response: response as any,
223+
response,
224224
};
225225
}
226226
};

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/types.gen.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ export type RequestResult<
129129
) & {
130130
/** request may be undefined, because error may be from building the request object itself */
131131
request?: Request;
132-
response: Response;
132+
/** response may be undefined, because error may be from building the request object itself or from a network error */
133+
response?: Response;
133134
}
134135
>;
135136

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/client.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ export const createClient = (config: Config = {}): Client => {
204204

205205
for (const fn of interceptors.error.fns) {
206206
if (fn) {
207-
finalError = (await fn(error, response, request, options as any)) as unknown;
207+
finalError = (await fn(finalError, response, request, options as any)) as unknown;
208208
}
209209
}
210210

@@ -220,7 +220,7 @@ export const createClient = (config: Config = {}): Client => {
220220
: {
221221
error: finalError,
222222
request,
223-
response: response as any,
223+
response,
224224
};
225225
}
226226
};

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/types.gen.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ export type RequestResult<
129129
) & {
130130
/** request may be undefined, because error may be from building the request object itself */
131131
request?: Request;
132-
response: Response;
132+
/** response may be undefined, because error may be from building the request object itself or from a network error */
133+
response?: Response;
133134
}
134135
>;
135136

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/client.gen.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ export const createClient = (config: Config = {}): Client => {
127127

128128
const result: {
129129
request?: HttpRequest<unknown>;
130-
response: any;
130+
response?: any;
131131
} = {
132132
request: undefined,
133-
response: null,
133+
response: undefined,
134134
};
135135

136136
try {
@@ -180,7 +180,7 @@ export const createClient = (config: Config = {}): Client => {
180180
if (fn) {
181181
finalError = (await fn(
182182
finalError,
183-
result.response as any,
183+
result.response,
184184
result.request,
185185
options as any,
186186
)) as string;

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/types.gen.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ export type RequestResult<
134134
error: TError[keyof TError];
135135
/** request may be undefined, because error may be from building the request object itself */
136136
request?: HttpRequest<unknown>;
137-
response: HttpErrorResponse & {
137+
/** response may be undefined, because error may be from building the request object itself or from a network error */
138+
response?: HttpErrorResponse & {
138139
error: TError[keyof TError] | null;
139140
};
140141
}

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/utils.gen.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,8 @@ export const mergeHeaders = (
314314

315315
type ErrInterceptor<Err, Res, Req, Options> = (
316316
error: Err,
317-
response: Res,
317+
/** response may be undefined due to a network error where no response object is produced */
318+
response: Res | undefined,
318319
/** request may be undefined, because error may be from building the request object itself */
319320
request: Req | undefined,
320321
options: Options,

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/client.gen.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ export const createClient = (config: Config = {}): Client => {
127127

128128
const result: {
129129
request?: HttpRequest<unknown>;
130-
response: any;
130+
response?: any;
131131
} = {
132132
request: undefined,
133-
response: null,
133+
response: undefined,
134134
};
135135

136136
try {
@@ -180,7 +180,7 @@ export const createClient = (config: Config = {}): Client => {
180180
if (fn) {
181181
finalError = (await fn(
182182
finalError,
183-
result.response as any,
183+
result.response,
184184
result.request,
185185
options as any,
186186
)) as string;

0 commit comments

Comments
 (0)