Command for resetting a match back to pending status.
export class ResetToPendingCommand extends BaseCommand { constructor( matchIndex: number, beforeState: MangaMatchResult, afterState: MangaMatchResult, onExecute: OnExecuteCallback, ) { super( matchIndex, beforeState, afterState, onExecute, CommandType.RESET_TO_PENDING, `Reset "${beforeState.kenmeiManga.title}" to pending`, ); }} Copy
export class ResetToPendingCommand extends BaseCommand { constructor( matchIndex: number, beforeState: MangaMatchResult, afterState: MangaMatchResult, onExecute: OnExecuteCallback, ) { super( matchIndex, beforeState, afterState, onExecute, CommandType.RESET_TO_PENDING, `Reset "${beforeState.kenmeiManga.title}" to pending`, ); }}
Execute the command (apply "after" state).
execute(): void { this.onExecute(this.afterState); } Copy
execute(): void { this.onExecute(this.afterState); }
Undo the command (restore "before" state).
undo(): void { this.onExecute(this.beforeState); } Copy
undo(): void { this.onExecute(this.beforeState); }
Get user-friendly description of what this command does.
getDescription(): string { return this.metadata.description; } Copy
getDescription(): string { return this.metadata.description; }
Get metadata about this command.
getMetadata(): CommandMetadata { return this.metadata; } Copy
getMetadata(): CommandMetadata { return this.metadata; }
Command for resetting a match back to pending status.
Source