Skip to content

Commit

Permalink
Merge pull request #19 from narthur/codegen
Browse files Browse the repository at this point in the history
Codegen
  • Loading branch information
narthur committed Apr 11, 2024
2 parents 0994ab8 + 3c4ecbe commit 7acfb78
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/row.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Factory } from "./factory.js";
import { BaserowSdk } from "./index.js";

export type RowType = Record<string, unknown> & { id: number; order: string };
Expand All @@ -6,18 +7,21 @@ export type RowOptions<T> = {
rowId: number;
row: T;
sdk: BaserowSdk;
repository: Factory;
};
export abstract class Row<T extends RowType> {
protected tableId: number;
protected rowId: number;
protected row: T;
protected sdk: BaserowSdk;
protected repository: Factory;

constructor({ tableId, rowId, row, sdk }: RowOptions<T>) {
constructor({ tableId, rowId, row, sdk, repository }: RowOptions<T>) {
this.tableId = tableId;
this.rowId = rowId;
this.row = row;
this.sdk = sdk;
this.repository = repository;
}

public getRow(): T {
Expand Down

0 comments on commit 7acfb78

Please sign in to comment.