Skip to content

Commit

Permalink
fix: Tighten table expression type signatures. (#374)
Browse files Browse the repository at this point in the history
* fix: Tighten table expression type signature.

* fix: Further tighten expr func type.
  • Loading branch information
jheer authored Oct 4, 2024
1 parent ab44a1f commit 8faf030
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/table/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,13 @@ export type TableExprString = string | Stringable;
export type Struct = Record<string, any>;

/** A function defined over a table row. */
export type TableExprFunc = (d?: Struct, $?: Params) => any;
export type TableExprFunc = (d: Struct, $: Params) => any;

/** A table expression defined over a single table. */
export type TableExpr = TableExprFunc | TableExprString;

/** A function defined over rows from two tables. */
export type TableExprFunc2 = (a?: Struct, b?: Struct, $?: Params) => any;
export type TableExprFunc2 = (a: Struct, b: Struct, $: Params) => any;

/** A table expression defined over two tables. */
export type TableExpr2 = TableExprFunc2 | TableExprString;
Expand Down

0 comments on commit 8faf030

Please sign in to comment.