Improve event types

This commit is contained in:
Alex Gleason
2023-05-06 16:51:23 -05:00
committed by fiatjaf_
parent d0bd599ce8
commit 8a53b3b8b3
8 changed files with 29 additions and 28 deletions

View File

@@ -48,7 +48,7 @@ export function createDelegation(
}
}
export function getDelegator(event: Event): string | null {
export function getDelegator(event: Event<number>): string | null {
// find delegation tag
let tag = event.tags.find(tag => tag[0] === 'delegation' && tag.length >= 4)
if (!tag) return null