Cleanup after merge

This commit is contained in:
Felix Kaspar 2023-11-14 17:34:50 +01:00
parent 01bc1b0303
commit 02957f7757
4 changed files with 7 additions and 17 deletions

View File

@ -1,5 +1,9 @@
export interface Action { export interface Action {
values: any; protected values: any;
type: string; type: string;
actions?: Action[]; actions?: Action[];
} }
export interface WaitAction extends Action {
values: { id: number }
}

View File

@ -1,9 +0,0 @@
export interface Operation {
protected values: any;
type: string;
operations?: Operation[];
}
export interface WaitOperation extends Operation {
values: { id: number }
}

View File

@ -1,5 +0,0 @@
export interface PDF {
originalFileName: string;
fileName: string;
buffer: Uint8Array;
}

View File

@ -1,5 +1,5 @@
import { organizeWaitOperations } from "./organizeWaitOperations"; import { organizeWaitOperations } from "./organizeWaitOperations";
import { Action } from "../../declarations/Action"; import { Action, WaitAction } from "../../declarations/Action";
import { OperationsType } from "../../src/index"; import { OperationsType } from "../../src/index";
import { PdfFile } from "../wrappers/PdfFile"; import { PdfFile } from "../wrappers/PdfFile";
@ -34,7 +34,7 @@ export async function * traverseOperations(operations: Action[], input: PdfFile[
case "done": // Skip this, because it is a valid node. case "done": // Skip this, because it is a valid node.
break; break;
case "wait": case "wait":
const waitOperation = waitOperations[action.values.id]; const waitOperation = waitOperations[(action as WaitAction).values.id];
if(Array.isArray(input)) { if(Array.isArray(input)) {
waitOperation.input.concat(input); // TODO: May have unexpected concequences. Needs further testing! waitOperation.input.concat(input); // TODO: May have unexpected concequences. Needs further testing!