clan-cli: Ignore new type hints in api/serde.py

clan-cli: Ignore new type hints in api/serde.py

clan-cli: Ignore new type hints in api/serde.py

clan-cli: Ignore new type hints in api/serde.py
This commit is contained in:
Qubasa
2025-01-06 15:41:20 +01:00
parent 1b1fa8c71b
commit 63331a2a44
8 changed files with 27 additions and 24 deletions

View File

@@ -43,14 +43,18 @@ export interface GtkResponse<T> {
op_key: string;
}
export const callApi = async <K extends OperationNames>(
method: K,
args: OperationArgs<K>,
): Promise<OperationResponse<K>> => {
console.log("Calling API", method, args);
const response = await (window as unknown as Record<OperationNames, (args: OperationArgs<OperationNames>) => Promise<OperationResponse<OperationNames>>>)[method](args);
const response = await (
window as unknown as Record<
OperationNames,
(
args: OperationArgs<OperationNames>,
) => Promise<OperationResponse<OperationNames>>
>
)[method](args);
return response as OperationResponse<K>;
};

View File

@@ -26,7 +26,6 @@ export const client = new QueryClient();
const root = document.getElementById("app");
if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
throw new Error(
"Root element not found. Did you forget to add it to your index.html? Or maybe the id attribute got misspelled?",