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:
@@ -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>;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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?",
|
||||
|
||||
Reference in New Issue
Block a user