Skip to content

Commit

Permalink
Revert "add return types"
Browse files Browse the repository at this point in the history
This reverts commit 7a05c1b.
  • Loading branch information
narthur committed Mar 14, 2024
1 parent 7a05c1b commit 1339ee2
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ export class BaserowSdk {
c.defaults.headers.common["Authorization"] = `Token ${databaseToken}`;
}

public async addRow<
T extends Record<string, unknown>,
R extends Record<string, unknown>,
>(tableId: number, input: T, options: AddRowOptions = {}): Promise<R> {
const { data } = await c.post<R>(
public async addRow<T extends Record<string, unknown>>(
tableId: number,
input: T,
options: AddRowOptions = {},
): Promise<T> {
const { data } = await c.post<T>(
`/database/rows/table/${tableId}/`,
input,
{ params: options },
Expand Down Expand Up @@ -76,16 +77,13 @@ export class BaserowSdk {
return data;
}

public async updateRow<
T extends Record<string, unknown>,
R extends Record<string, unknown>,
>(
public async updateRow<T extends Record<string, unknown>>(
tableId: number,
rowId: number,
input: T,
options: UpdateRowOptions = {},
): Promise<R> {
const { data } = await c.patch<R>(
): Promise<T> {
const { data } = await c.patch<T>(
`/database/rows/table/${tableId}/${rowId}/`,
input,
{ params: options },
Expand Down

0 comments on commit 1339ee2

Please sign in to comment.