fix: debug with type error checks

This commit is contained in:
pa
2025-07-16 14:23:06 +09:00
committed by Natsumi
parent 0e50a67c25
commit b23687430e
13 changed files with 217 additions and 194 deletions

View File

@@ -46,6 +46,27 @@ export type GetWorlds = (
option?: string;
}>;
export type SaveWorld = (params: {
id: string;
name?: string;
description?: string;
capacity?: number;
recommendedCapacity?: number;
previewYoutubeId?: string;
urlList?: string[];
tags?: string[];
}) => Promise<{
json: SaveWorldResponse;
params: {
id: string;
name?: string;
description?: string;
capacity?: number;
recommendedCapacity?: number;
previewYoutubeId?: string;
};
}>;
// Type aliases
type WorldSearchResponse = WorldSearchResponseItem[];
@@ -67,3 +88,20 @@ interface GetWorldResponse extends BaseWorld {
version: number;
visits: number;
}
interface SaveWorldResponse extends BaseWorld {
description: string;
featured: boolean;
pendingUpload: boolean;
tags: string[];
thumbnailImageUrl: string;
imageUrl: string;
name: string;
authorId: string;
authorName: string;
id: string;
updated_at: string;
urlList: string[];
version: number;
visits: number;
}

View File

@@ -398,29 +398,6 @@ declare global {
data?: any;
}): Promise<{ status: number; data: string }>;
};
const electron: {
openFileDialog: () => Promise<string>;
openDirectoryDialog: () => Promise<string>;
desktopNotification: (
displayName: string,
body?: string,
image?: string
) => Promise<void>;
onWindowPositionChanged: (
Function: (event: any, position: { x: number; y: number }) => void
) => void;
onWindowSizeChanged: (
Function: (
event: any,
size: { width: number; height: number }
) => void
) => void;
onWindowStateChange: (
Function: (event: any, state: { windowState: any }) => void
) => void;
restartApp: () => Promise<void>;
};
}
export {};