Skip to content

Commit 27724d9

Browse files
myspiveymattbaileyuk
authored andcommitted
Further Refine / Simply ExprNode type
Rather than the union, just marking fields optional is cleaner as they all share `type`. This reduces the TS error complexity as well.
1 parent ae6e2a6 commit 27724d9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

jsonata.d.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ declare namespace jsonata {
77

88
interface ExprNode {
99
type: string;
10-
value: any;
11-
position: number;
12-
arguments: {type: string, steps: ExprNode[]}[] | ExprNode[];
10+
value?: any;
11+
position?: number;
12+
arguments?: ExprNode[];
1313
name?: string;
14-
procedure: ExprNode;
14+
procedure?: ExprNode;
15+
steps?: ExprNode[];
1516
}
1617

1718
interface JsonataError extends Error {

0 commit comments

Comments
 (0)