diff --git a/src/AEG/AEGTree.ts b/src/AEG/AEGTree.ts index 3f2b6a31..c2898f6c 100644 --- a/src/AEG/AEGTree.ts +++ b/src/AEG/AEGTree.ts @@ -260,6 +260,7 @@ export class AEGTree { /** * Returns a string representation of this AEGTree. + * * @returns Structured ordering of all children in this AEGTree in string form. */ public toString(): string { diff --git a/src/index.ts b/src/index.ts index e10ac301..106e6169 100644 --- a/src/index.ts +++ b/src/index.ts @@ -208,7 +208,7 @@ export function aegStringify(treeData: AEGTree | ProofModeNode[]): string { /** * Calls appropriate methods to save the current AEGTree as a file. */ -async function saveMode() { +async function saveMode(): Promise { let name: string; let data: AEGTree | ProofModeNode[]; @@ -216,12 +216,12 @@ async function saveMode() { name = "AEG Tree"; data = TreeContext.tree; } else { - if (TreeContext.proof.length === 0) { - name = "[] \u2192 []"; + if (TreeContext.proof.length === 1) { + name = "One-Step Proof"; } else { name = TreeContext.proof[0].tree.toString() + - "\u2192" + + " PROVES " + TreeContext.getLastProofStep().tree.toString(); } data = TreeContext.proof;