diff --git a/src/db/events.ts b/src/db/events.ts index 71bc765..2f29189 100644 --- a/src/db/events.ts +++ b/src/db/events.ts @@ -105,9 +105,7 @@ function getFilterQuery(filter: DittoFilter) { } /** Get events for filters from the database. */ -async function getFilters(filters: [DittoFilter]): Promise[]>; -async function getFilters(filters: DittoFilter[]): Promise; -async function getFilters(filters: DittoFilter[]) { +async function getFilters(filters: DittoFilter[]): Promise[]> { const queries = filters .map(getFilterQuery) .map((query) => query.execute()); @@ -115,7 +113,7 @@ async function getFilters(filters: DittoFilter[]) { const events = (await Promise.all(queries)).flat(); return events.map((event) => ( - { ...event, tags: JSON.parse(event.tags) } + { ...event, tags: JSON.parse(event.tags) } as SignedEvent )); }