mirror of
https://github.com/mgeeky/decode-spam-headers.git
synced 2026-02-22 13:33:30 +01:00
MAESTRO: fix strict tsc compile
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user