Skip to content

Commit 957ac82

Browse files
committed
samples/*/typescript-fetch: re-generate runtime.ts
1 parent 0d5c261 commit 957ac82

18 files changed

Lines changed: 324 additions & 0 deletions

File tree

samples/client/others/typescript-fetch/infinite-recursion-issue/runtime.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,20 +261,38 @@ export class ResponseError extends Error {
261261
override name: "ResponseError" = "ResponseError";
262262
constructor(public response: Response, msg?: string) {
263263
super(msg);
264+
265+
// restore prototype chain
266+
const actualProto = new.target.prototype;
267+
if (Object.setPrototypeOf) {
268+
Object.setPrototypeOf(this, actualProto);
269+
}
264270
}
265271
}
266272

267273
export class FetchError extends Error {
268274
override name: "FetchError" = "FetchError";
269275
constructor(public cause: Error, msg?: string) {
270276
super(msg);
277+
278+
// restore prototype chain
279+
const actualProto = new.target.prototype;
280+
if (Object.setPrototypeOf) {
281+
Object.setPrototypeOf(this, actualProto);
282+
}
271283
}
272284
}
273285

274286
export class RequiredError extends Error {
275287
override name: "RequiredError" = "RequiredError";
276288
constructor(public field: string, msg?: string) {
277289
super(msg);
290+
291+
// restore prototype chain
292+
const actualProto = new.target.prototype;
293+
if (Object.setPrototypeOf) {
294+
Object.setPrototypeOf(this, actualProto);
295+
}
278296
}
279297
}
280298

samples/client/others/typescript-fetch/self-import-issue/runtime.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,20 +261,38 @@ export class ResponseError extends Error {
261261
override name: "ResponseError" = "ResponseError";
262262
constructor(public response: Response, msg?: string) {
263263
super(msg);
264+
265+
// restore prototype chain
266+
const actualProto = new.target.prototype;
267+
if (Object.setPrototypeOf) {
268+
Object.setPrototypeOf(this, actualProto);
269+
}
264270
}
265271
}
266272

267273
export class FetchError extends Error {
268274
override name: "FetchError" = "FetchError";
269275
constructor(public cause: Error, msg?: string) {
270276
super(msg);
277+
278+
// restore prototype chain
279+
const actualProto = new.target.prototype;
280+
if (Object.setPrototypeOf) {
281+
Object.setPrototypeOf(this, actualProto);
282+
}
271283
}
272284
}
273285

274286
export class RequiredError extends Error {
275287
override name: "RequiredError" = "RequiredError";
276288
constructor(public field: string, msg?: string) {
277289
super(msg);
290+
291+
// restore prototype chain
292+
const actualProto = new.target.prototype;
293+
if (Object.setPrototypeOf) {
294+
Object.setPrototypeOf(this, actualProto);
295+
}
278296
}
279297
}
280298

samples/client/petstore/typescript-fetch/builds/allOf-nullable/runtime.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,20 +261,38 @@ export class ResponseError extends Error {
261261
override name: "ResponseError" = "ResponseError";
262262
constructor(public response: Response, msg?: string) {
263263
super(msg);
264+
265+
// restore prototype chain
266+
const actualProto = new.target.prototype;
267+
if (Object.setPrototypeOf) {
268+
Object.setPrototypeOf(this, actualProto);
269+
}
264270
}
265271
}
266272

267273
export class FetchError extends Error {
268274
override name: "FetchError" = "FetchError";
269275
constructor(public cause: Error, msg?: string) {
270276
super(msg);
277+
278+
// restore prototype chain
279+
const actualProto = new.target.prototype;
280+
if (Object.setPrototypeOf) {
281+
Object.setPrototypeOf(this, actualProto);
282+
}
271283
}
272284
}
273285

274286
export class RequiredError extends Error {
275287
override name: "RequiredError" = "RequiredError";
276288
constructor(public field: string, msg?: string) {
277289
super(msg);
290+
291+
// restore prototype chain
292+
const actualProto = new.target.prototype;
293+
if (Object.setPrototypeOf) {
294+
Object.setPrototypeOf(this, actualProto);
295+
}
278296
}
279297
}
280298

samples/client/petstore/typescript-fetch/builds/allOf-readonly/runtime.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,20 +261,38 @@ export class ResponseError extends Error {
261261
override name: "ResponseError" = "ResponseError";
262262
constructor(public response: Response, msg?: string) {
263263
super(msg);
264+
265+
// restore prototype chain
266+
const actualProto = new.target.prototype;
267+
if (Object.setPrototypeOf) {
268+
Object.setPrototypeOf(this, actualProto);
269+
}
264270
}
265271
}
266272

267273
export class FetchError extends Error {
268274
override name: "FetchError" = "FetchError";
269275
constructor(public cause: Error, msg?: string) {
270276
super(msg);
277+
278+
// restore prototype chain
279+
const actualProto = new.target.prototype;
280+
if (Object.setPrototypeOf) {
281+
Object.setPrototypeOf(this, actualProto);
282+
}
271283
}
272284
}
273285

274286
export class RequiredError extends Error {
275287
override name: "RequiredError" = "RequiredError";
276288
constructor(public field: string, msg?: string) {
277289
super(msg);
290+
291+
// restore prototype chain
292+
const actualProto = new.target.prototype;
293+
if (Object.setPrototypeOf) {
294+
Object.setPrototypeOf(this, actualProto);
295+
}
278296
}
279297
}
280298

samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,20 +261,38 @@ export class ResponseError extends Error {
261261
override name: "ResponseError" = "ResponseError";
262262
constructor(public response: Response, msg?: string) {
263263
super(msg);
264+
265+
// restore prototype chain
266+
const actualProto = new.target.prototype;
267+
if (Object.setPrototypeOf) {
268+
Object.setPrototypeOf(this, actualProto);
269+
}
264270
}
265271
}
266272

267273
export class FetchError extends Error {
268274
override name: "FetchError" = "FetchError";
269275
constructor(public cause: Error, msg?: string) {
270276
super(msg);
277+
278+
// restore prototype chain
279+
const actualProto = new.target.prototype;
280+
if (Object.setPrototypeOf) {
281+
Object.setPrototypeOf(this, actualProto);
282+
}
271283
}
272284
}
273285

274286
export class RequiredError extends Error {
275287
override name: "RequiredError" = "RequiredError";
276288
constructor(public field: string, msg?: string) {
277289
super(msg);
290+
291+
// restore prototype chain
292+
const actualProto = new.target.prototype;
293+
if (Object.setPrototypeOf) {
294+
Object.setPrototypeOf(this, actualProto);
295+
}
278296
}
279297
}
280298

samples/client/petstore/typescript-fetch/builds/default/runtime.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,20 +261,38 @@ export class ResponseError extends Error {
261261
override name: "ResponseError" = "ResponseError";
262262
constructor(public response: Response, msg?: string) {
263263
super(msg);
264+
265+
// restore prototype chain
266+
const actualProto = new.target.prototype;
267+
if (Object.setPrototypeOf) {
268+
Object.setPrototypeOf(this, actualProto);
269+
}
264270
}
265271
}
266272

267273
export class FetchError extends Error {
268274
override name: "FetchError" = "FetchError";
269275
constructor(public cause: Error, msg?: string) {
270276
super(msg);
277+
278+
// restore prototype chain
279+
const actualProto = new.target.prototype;
280+
if (Object.setPrototypeOf) {
281+
Object.setPrototypeOf(this, actualProto);
282+
}
271283
}
272284
}
273285

274286
export class RequiredError extends Error {
275287
override name: "RequiredError" = "RequiredError";
276288
constructor(public field: string, msg?: string) {
277289
super(msg);
290+
291+
// restore prototype chain
292+
const actualProto = new.target.prototype;
293+
if (Object.setPrototypeOf) {
294+
Object.setPrototypeOf(this, actualProto);
295+
}
278296
}
279297
}
280298

samples/client/petstore/typescript-fetch/builds/enum/runtime.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,20 +261,38 @@ export class ResponseError extends Error {
261261
override name: "ResponseError" = "ResponseError";
262262
constructor(public response: Response, msg?: string) {
263263
super(msg);
264+
265+
// restore prototype chain
266+
const actualProto = new.target.prototype;
267+
if (Object.setPrototypeOf) {
268+
Object.setPrototypeOf(this, actualProto);
269+
}
264270
}
265271
}
266272

267273
export class FetchError extends Error {
268274
override name: "FetchError" = "FetchError";
269275
constructor(public cause: Error, msg?: string) {
270276
super(msg);
277+
278+
// restore prototype chain
279+
const actualProto = new.target.prototype;
280+
if (Object.setPrototypeOf) {
281+
Object.setPrototypeOf(this, actualProto);
282+
}
271283
}
272284
}
273285

274286
export class RequiredError extends Error {
275287
override name: "RequiredError" = "RequiredError";
276288
constructor(public field: string, msg?: string) {
277289
super(msg);
290+
291+
// restore prototype chain
292+
const actualProto = new.target.prototype;
293+
if (Object.setPrototypeOf) {
294+
Object.setPrototypeOf(this, actualProto);
295+
}
278296
}
279297
}
280298

samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,20 +261,38 @@ export class ResponseError extends Error {
261261
override name: "ResponseError" = "ResponseError";
262262
constructor(public response: Response, msg?: string) {
263263
super(msg);
264+
265+
// restore prototype chain
266+
const actualProto = new.target.prototype;
267+
if (Object.setPrototypeOf) {
268+
Object.setPrototypeOf(this, actualProto);
269+
}
264270
}
265271
}
266272

267273
export class FetchError extends Error {
268274
override name: "FetchError" = "FetchError";
269275
constructor(public cause: Error, msg?: string) {
270276
super(msg);
277+
278+
// restore prototype chain
279+
const actualProto = new.target.prototype;
280+
if (Object.setPrototypeOf) {
281+
Object.setPrototypeOf(this, actualProto);
282+
}
271283
}
272284
}
273285

274286
export class RequiredError extends Error {
275287
override name: "RequiredError" = "RequiredError";
276288
constructor(public field: string, msg?: string) {
277289
super(msg);
290+
291+
// restore prototype chain
292+
const actualProto = new.target.prototype;
293+
if (Object.setPrototypeOf) {
294+
Object.setPrototypeOf(this, actualProto);
295+
}
278296
}
279297
}
280298

samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,20 +261,38 @@ export class ResponseError extends Error {
261261
override name: "ResponseError" = "ResponseError";
262262
constructor(public response: Response, msg?: string) {
263263
super(msg);
264+
265+
// restore prototype chain
266+
const actualProto = new.target.prototype;
267+
if (Object.setPrototypeOf) {
268+
Object.setPrototypeOf(this, actualProto);
269+
}
264270
}
265271
}
266272

267273
export class FetchError extends Error {
268274
override name: "FetchError" = "FetchError";
269275
constructor(public cause: Error, msg?: string) {
270276
super(msg);
277+
278+
// restore prototype chain
279+
const actualProto = new.target.prototype;
280+
if (Object.setPrototypeOf) {
281+
Object.setPrototypeOf(this, actualProto);
282+
}
271283
}
272284
}
273285

274286
export class RequiredError extends Error {
275287
override name: "RequiredError" = "RequiredError";
276288
constructor(public field: string, msg?: string) {
277289
super(msg);
290+
291+
// restore prototype chain
292+
const actualProto = new.target.prototype;
293+
if (Object.setPrototypeOf) {
294+
Object.setPrototypeOf(this, actualProto);
295+
}
278296
}
279297
}
280298

samples/client/petstore/typescript-fetch/builds/oneOf/runtime.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,20 +261,38 @@ export class ResponseError extends Error {
261261
override name: "ResponseError" = "ResponseError";
262262
constructor(public response: Response, msg?: string) {
263263
super(msg);
264+
265+
// restore prototype chain
266+
const actualProto = new.target.prototype;
267+
if (Object.setPrototypeOf) {
268+
Object.setPrototypeOf(this, actualProto);
269+
}
264270
}
265271
}
266272

267273
export class FetchError extends Error {
268274
override name: "FetchError" = "FetchError";
269275
constructor(public cause: Error, msg?: string) {
270276
super(msg);
277+
278+
// restore prototype chain
279+
const actualProto = new.target.prototype;
280+
if (Object.setPrototypeOf) {
281+
Object.setPrototypeOf(this, actualProto);
282+
}
271283
}
272284
}
273285

274286
export class RequiredError extends Error {
275287
override name: "RequiredError" = "RequiredError";
276288
constructor(public field: string, msg?: string) {
277289
super(msg);
290+
291+
// restore prototype chain
292+
const actualProto = new.target.prototype;
293+
if (Object.setPrototypeOf) {
294+
Object.setPrototypeOf(this, actualProto);
295+
}
278296
}
279297
}
280298

0 commit comments

Comments
 (0)