mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-19 07:20:21 +02:00
Include runtime types, otherwise ts goes crazy
This commit is contained in:
@@ -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...");
|
||||
|
Reference in New Issue
Block a user