fix(events): resolve TypeScript build errors
- Import EventBus/EventBusConfig types from types.js instead of bus.js - Convert SQLite result.changes bigint to number https://claude.ai/code/session_01NAdzND6SJEF1Fgk8dRDmAD
This commit is contained in:
parent
e9637f8521
commit
f9aa50d67d
@ -12,13 +12,8 @@
|
||||
import type { MoltbotConfig } from "../config/config.js";
|
||||
import { onAgentEvent, type AgentEventPayload } from "../infra/agent-events.js";
|
||||
import { onDiagnosticEvent, type DiagnosticEventPayload } from "../infra/diagnostic-events.js";
|
||||
import {
|
||||
createEventBus,
|
||||
setEventBus,
|
||||
getEventBus,
|
||||
type EventBus,
|
||||
type EventBusConfig,
|
||||
} from "./bus.js";
|
||||
import { createEventBus, setEventBus, getEventBus } from "./bus.js";
|
||||
import type { EventBus, EventBusConfig } from "./types.js";
|
||||
import { createEventStore, getDefaultEventStorePath } from "./store.js";
|
||||
import { createEvent, type EventTopicMap } from "./catalog.js";
|
||||
|
||||
|
||||
@ -249,7 +249,7 @@ export function createEventStore(config: EventStoreConfig): EventStore & {
|
||||
|
||||
const prune = async (olderThan: number): Promise<number> => {
|
||||
const result = pruneByTimeStmt.run(olderThan);
|
||||
return result.changes;
|
||||
return Number(result.changes);
|
||||
};
|
||||
|
||||
const close = (): void => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user