Skip to content

Commit 748863b

Browse files
committed
fix(api): correct type errors from Biome lint fixes
1 parent 663f2c5 commit 748863b

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

packages/api/src/middleware/enforce-limits.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,11 @@ export function enforceLimits(
4646

4747
const limitKey = limitKeyMap[result.exceeded] ?? result.exceeded;
4848
const currentKey = currentKeyMap[result.exceeded] ?? result.exceeded;
49-
const limitsRecord = result.limits as Record<string, number | undefined>;
50-
const currentRecord = result.current as Record<
49+
const limitsRecord = result.limits as unknown as Record<
50+
string,
51+
number | undefined
52+
>;
53+
const currentRecord = result.current as unknown as Record<
5154
string,
5255
number | undefined
5356
>;

packages/api/src/routes/marketplace.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
} from "@secondlayer/shared/db/queries/marketplace";
1414
import { getSubgraph } from "@secondlayer/shared/db/queries/subgraphs";
1515
import { pgSchemaName } from "@secondlayer/shared/db/queries/subgraphs";
16+
import type { SubgraphDefinition } from "@secondlayer/subgraphs";
1617
import { Hono } from "hono";
1718
import { getAccountId, getApiKeyId } from "../lib/ownership.ts";
1819
import {
@@ -30,7 +31,7 @@ const app = new Hono();
3031

3132
async function query(text: string, params: unknown[] = []) {
3233
const client = getRawClient();
33-
return client.unsafe(text, params);
34+
return client.unsafe(text, params as never[]);
3435
}
3536

3637
// ── Browse public subgraphs ─────────────────────────────────────────────
@@ -379,10 +380,10 @@ app.post("/subgraphs/:name/fork", requireAuth(), async (c) => {
379380
}
380381

381382
// Import the copied handler to get definition
382-
let def: Record<string, unknown>;
383+
let def: SubgraphDefinition;
383384
try {
384385
const mod = await import(`${newHandlerPath}?t=${Date.now()}`);
385-
def = (mod.default ?? mod) as Record<string, unknown>;
386+
def = (mod.default ?? mod) as SubgraphDefinition;
386387
} catch (err) {
387388
return c.json(
388389
{ error: `Failed to load handler: ${getErrorMessage(err)}` },

0 commit comments

Comments
 (0)