Refactor IPC handlers to enforce consistent return types and enhance type definitions
- Update return types for IPC handlers in `character.ipc.ts`, `chapter.ipc.ts`, and `location.ipc.ts` for stricter type safety. - Introduce new type definitions for better structure and clarity. - Remove redundant console logs and unnecessary comments for cleaner code.
This commit is contained in:
@@ -147,8 +147,8 @@ ipcMain.handle('db:chapter:information:add', createHandler<AddChapterInformation
|
||||
);
|
||||
|
||||
// DELETE /chapter/resume/remove - Remove chapter information
|
||||
ipcMain.handle('db:chapter:information:remove', createHandler<string, any>(
|
||||
function(userId: string, chapterInfoId: string, lang: 'fr' | 'en') {
|
||||
ipcMain.handle('db:chapter:information:remove', createHandler<string, boolean>(
|
||||
function(userId: string, chapterInfoId: string, lang: 'fr' | 'en'): boolean {
|
||||
return Chapter.removeChapterInformation(userId, chapterInfoId, lang);
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user