Remove incorrect "change_categories" options type from Chapters::performAction

This commit is contained in:
schroda
2024-04-20 22:55:44 +02:00
parent 7325212b8e
commit d35ef4fa7f

View File

@@ -270,15 +270,13 @@ export class Chapters {
wasManuallyMarkedAsRead, wasManuallyMarkedAsRead,
chapters, chapters,
}: Action extends 'mark_as_read' }: Action extends 'mark_as_read'
? { wasManuallyMarkedAsRead: boolean; chapters?: never }
: Action extends 'change_categories'
? { ? {
wasManuallyMarkedAsRead?: never; wasManuallyMarkedAsRead: boolean;
chapters: (ChapterDownloadInfo & ChapterBookmarkInfo & ChapterReadInfo)[]; chapters: (ChapterDownloadInfo & ChapterBookmarkInfo & ChapterReadInfo)[];
} }
: { : {
wasManuallyMarkedAsRead?: boolean; wasManuallyMarkedAsRead?: never;
chapters?: (ChapterDownloadInfo & ChapterBookmarkInfo & ChapterReadInfo)[]; chapters?: never;
}, },
): Promise<void> { ): Promise<void> {
switch (action) { switch (action) {