File tree Expand file tree Collapse file tree
modules/openapi-generator/src/main/resources/typescript-fetch
petstore/typescript-fetch
prefix-parameter-interfaces/src
without-runtime-checks/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -251,20 +251,38 @@ export class ResponseError extends Error {
251251 override name: " ResponseError" = " ResponseError" ;
252252 constructor(public response: Response, msg?: string) {
253253 super(msg);
254+
255+ // restore prototype chain
256+ const actualProto = new.target.prototype;
257+ if (Object.setPrototypeOf) {
258+ Object.setPrototypeOf(this, actualProto);
259+ }
254260 }
255261}
256262
257263export class FetchError extends Error {
258264 override name: " FetchError" = " FetchError" ;
259265 constructor(public cause: Error, msg?: string) {
260266 super(msg);
267+
268+ // restore prototype chain
269+ const actualProto = new.target.prototype;
270+ if (Object.setPrototypeOf) {
271+ Object.setPrototypeOf(this, actualProto);
272+ }
261273 }
262274}
263275
264276export class RequiredError extends Error {
265277 override name: " RequiredError" = " RequiredError" ;
266278 constructor(public field: string, msg?: string) {
267279 super(msg);
280+
281+ // restore prototype chain
282+ const actualProto = new.target.prototype;
283+ if (Object.setPrototypeOf) {
284+ Object.setPrototypeOf(this, actualProto);
285+ }
268286 }
269287}
270288
Original file line number Diff line number Diff 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
267273export 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
274286export 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
Original file line number Diff line number Diff 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
267273export 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
274286export 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
Original file line number Diff line number Diff 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
267273export 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
274286export 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
Original file line number Diff line number Diff 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
267273export 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
274286export 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
Original file line number Diff line number Diff 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
267273export 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
274286export 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
Original file line number Diff line number Diff 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
267273export 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
274286export 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
Original file line number Diff line number Diff 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
267273export 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
274286export 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
Original file line number Diff line number Diff 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
267273export 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
274286export 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
Original file line number Diff line number Diff 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
267273export 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
274286export 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
You can’t perform that action at this time.
0 commit comments