Skip to content

Commit 835c54e

Browse files
committed
Define proper types for the frontend tableau representation (#79)
I initially distinguished between terminal and internal trees as well as between terminal nodes, internal nodes and unsupported nodes, but applying this typing in the logic and convincing tsc that everything was fine became too unwildly.
1 parent fccb884 commit 835c54e

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

frontend/src/app/types.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,21 @@ export type ParseResponse = {
178178
error: string | null;
179179
};
180180

181+
//
182+
// Our internal representation of proof trees
183+
//
184+
185+
export type ProofNode = {
186+
id?: number;
187+
rule?: string;
188+
mod?: string;
189+
head?: string;
190+
args?: string;
191+
sign?: boolean;
192+
end?: true;
193+
};
194+
195+
export interface ProofTree {
196+
nodes: ProofNode[];
197+
subtrees?: ProofTree[];
198+
}

0 commit comments

Comments
 (0)