From 4602b85afe8cd50dfa2b0d6be6ac654e71a0b732 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 16 Aug 2023 12:57:02 -0500 Subject: [PATCH] db/events: remove unnecessary overloads --- src/db/events.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 )); }