Skip to content

Commit

Permalink
strongly type return value
Browse files Browse the repository at this point in the history
  • Loading branch information
jonesmac committed Oct 22, 2024
1 parent 491eef2 commit 4a34b04
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { Utm } from '@xyo-network/advertising-payload-plugins'
import { isUtm } from '@xyo-network/advertising-payload-plugins'
import { StorageArchivist, StorageArchivistConfigSchema } from '@xyo-network/archivist-storage'

Expand All @@ -23,7 +24,7 @@ export const UtmStorageArchivist = async () => {
}
}

export const LatestUtmPayload = async () => {
export const LatestUtmPayload = async (): Promise<Utm | undefined> => {
const archivist = await UtmStorageArchivist()
return (await archivist.all()).findLast(isUtm)
return (await archivist.all()).findLast(isUtm) as Utm
}

0 comments on commit 4a34b04

Please sign in to comment.