Include runtime types, otherwise ts goes crazy

This commit is contained in:
Marcel Mraz 2024-11-26 23:15:30 +01:00
parent d2fed34a30
commit 725c25c966
No known key found for this signature in database
GPG key ID: 4EBD6E62DC830CD2
13 changed files with 4709 additions and 10 deletions

View file

@ -83,6 +83,7 @@ export const AIComponents = ({
}
try {
// @ts-expect-error
const { html } = await response.json();
if (!html) {
@ -140,9 +141,11 @@ export const AIComponents = ({
};
}
// @ts-expect-error
throw new Error(json.message || "Generation failed...");
}
// @ts-expect-error
const generatedResponse = json.generatedResponse;
if (!generatedResponse) {
throw new Error("Generation failed...");