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

@@ -74,5 +74,5 @@ The hacker-themed dark colour palette (from spec FR-14):
- [x] Frontend starts with `npm run dev` and renders a blank page - [x] Frontend starts with `npm run dev` and renders a blank page
- [x] Linting passes on both sides (`ruff check backend/`, `npx eslint src/`, `npx prettier --check src/`) - [x] Linting passes on both sides (`ruff check backend/`, `npx eslint src/`, `npx prettier --check src/`)
- [x] Playwright test runner executes with `npx playwright test` (no tests yet, but config loads without error) - [x] Playwright test runner executes with `npx playwright test` (no tests yet, but config loads without error)
- [ ] TypeScript compilation succeeds with zero errors in strict mode - [x] TypeScript compilation succeeds with zero errors in strict mode
- [ ] Run `/speckit.analyze` to verify consistency - [ ] Run `/speckit.analyze` to verify consistency

View File

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