[Bug]: API incompatible Typescript type for aqlQuery #2676

Closed
opened 2026-02-28 20:23:56 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @t4cmyk on GitHub (Dec 3, 2025).

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

There seems to be a mismatch between the type definitions in

/node_modules/@actual-app/api/@types/loot-core/src/shared/query.d.ts and
/node_modules/@actual-app/api/@types/app/query.d.ts

which causes the following tsc compiler error for me:

src/sync.ts(114,9): error TS2345: Argument of type 'Query' is not assignable to parameter of type 'import("/app/node_modules/@actual-app/api/@types/loot-core/src/shared/query").Query'.
  Type 'Query' is missing the following properties from type 'Query': reset, serializeAsString
The command '/bin/sh -c npm run build' returned a non-zero code: 2

How can we reproduce the issue?

How can we reproduce the issue?

With version "@actual-app/api": "^25.12.0" try to compile this code:

import { q, aqlQuery } from "@actual-app/api";

await aqlQuery(
  q("transactions")
    .filter({ imported_id: tx.imported_id })
    .select(["id", "amount"])
);

Where are you hosting Actual?

Other

What browsers are you seeing the problem on?

Other

Operating System

Linux

Originally created by @t4cmyk on GitHub (Dec 3, 2025). ### Verified issue does not already exist? - [x] I have searched and found no existing issue ### What happened? There seems to be a mismatch between the type definitions in `/node_modules/@actual-app/api/@types/loot-core/src/shared/query.d.ts` and `/node_modules/@actual-app/api/@types/app/query.d.ts` which causes the following tsc compiler error for me: ``` src/sync.ts(114,9): error TS2345: Argument of type 'Query' is not assignable to parameter of type 'import("/app/node_modules/@actual-app/api/@types/loot-core/src/shared/query").Query'. Type 'Query' is missing the following properties from type 'Query': reset, serializeAsString The command '/bin/sh -c npm run build' returned a non-zero code: 2 ``` ### How can we reproduce the issue? How can we reproduce the issue? With version `"@actual-app/api": "^25.12.0"` try to compile this code: ```typescript import { q, aqlQuery } from "@actual-app/api"; await aqlQuery( q("transactions") .filter({ imported_id: tx.imported_id }) .select(["id", "amount"]) ); ``` ### Where are you hosting Actual? Other ### What browsers are you seeing the problem on? Other ### Operating System Linux
GiteaMirror added the bugAPI labels 2026-02-28 20:23:56 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#2676