MAESTRO: fix strict tsc compile

This commit is contained in:
Mariusz Banach
2026-02-17 23:20:37 +01:00
parent 0dc82e3c69
commit abc7aab840
2 changed files with 6 additions and 3 deletions

View File

@@ -39,7 +39,10 @@ export interface StreamRequestOptions<TBody, TEvent> {
}
export interface ApiClient {
request<TResponse>(path: string, init?: RequestInit & { body?: unknown }): Promise<TResponse>;
request<TResponse>(
path: string,
init?: Omit<RequestInit, "body"> & { body?: unknown },
): Promise<TResponse>;
get<TResponse>(path: string, init?: RequestInit): Promise<TResponse>;
post<TResponse, TBody>(path: string, body: TBody, init?: RequestInit): Promise<TResponse>;
stream<TBody, TEvent>(path: string, options: StreamRequestOptions<TBody, TEvent>): Promise<void>;
@@ -228,7 +231,7 @@ export const createApiClient = (options: ApiClientOptions = {}): ApiClient => {
const request = async <TResponse>(
path: string,
init: RequestInit & { body?: unknown } = {},
init: Omit<RequestInit, "body"> & { body?: unknown } = {},
): Promise<TResponse> => {
const url = resolveUrl(baseUrl, path);
const { body, headers, ...rest } = init;