remove the kind type parameter from events and filters.

This commit is contained in:
fiatjaf
2023-12-16 10:10:37 -03:00
parent 1939c46eaa
commit 6a07e7c1cc
21 changed files with 157 additions and 211 deletions

View File

@@ -1,12 +1,10 @@
import type { Event } from './event.ts'
type EventParams<K extends number> = Partial<Event<K>>
/** Build an event for testing purposes. */
export function buildEvent<K extends number = 1>(params: EventParams<K>): Event<K> {
export function buildEvent(params: Partial<Event>): Event {
return {
id: '',
kind: 1 as K,
kind: 1,
pubkey: '',
created_at: 0,
content: '',