1
0
Fork 0
mirror of synced 2024-08-05 13:21:26 +12:00

Type checking.

This commit is contained in:
mike12345567 2024-06-14 19:07:50 +01:00
parent cd1e7c0bad
commit 654a417d66
2 changed files with 2 additions and 2 deletions

View file

@ -137,7 +137,7 @@ export async function sqlOutputProcessing(
relationships: RelationshipsJson[],
opts?: { sqs?: boolean }
): Promise<Row[]> {
if (!Array.isArray(rows) || rows.length === 0 || rows[0].read === true) {
if (!Array.isArray(rows) || rows.length === 0 || "read" in rows[0]) {
return []
}
let finalRows: { [key: string]: Row } = {}

View file

@ -60,7 +60,7 @@ export async function searchView(
user: sdk.users.getUserContextBindings(ctx.user),
})
const searchOptions: RequiredKeys<SearchViewRowRequest> &
const searchOptions: RequiredKeys<Omit<SearchViewRowRequest, "countRows">> &
RequiredKeys<Pick<RowSearchParams, "tableId" | "query" | "fields">> = {
tableId: view.tableId,
query: enrichedQuery,