Migrate to openapi-ts generator

This commit is contained in:
2024-07-03 15:08:54 +02:00
parent c36b64cff1
commit ef531f6491
81 changed files with 1157 additions and 1004 deletions

View File

@@ -1,7 +1,3 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export class CancelError extends Error {
constructor(message: string) {
super(message);
@@ -28,12 +24,12 @@ export class CancelablePromise<T> implements Promise<T> {
readonly #cancelHandlers: (() => void)[];
readonly #promise: Promise<T>;
#resolve?: (value: T | PromiseLike<T>) => void;
#reject?: (reason?: any) => void;
#reject?: (reason?: unknown) => void;
constructor(
executor: (
resolve: (value: T | PromiseLike<T>) => void,
reject: (reason?: any) => void,
reject: (reason?: unknown) => void,
onCancel: OnCancel,
) => void,
) {
@@ -53,7 +49,7 @@ export class CancelablePromise<T> implements Promise<T> {
if (this.#resolve) this.#resolve(value);
};
const onReject = (reason?: any): void => {
const onReject = (reason?: unknown): void => {
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
return;
}
@@ -90,13 +86,13 @@ export class CancelablePromise<T> implements Promise<T> {
public then<TResult1 = T, TResult2 = never>(
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null,
onRejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null,
): Promise<TResult1 | TResult2> {
return this.#promise.then(onFulfilled, onRejected);
}
public catch<TResult = never>(
onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null,
onRejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null,
): Promise<T | TResult> {
return this.#promise.catch(onRejected);
}