Filter type with optional atributtes

This commit is contained in:
Íñigo Aréjula Aísa
2022-11-24 21:33:50 +01:00
committed by fiatjaf
parent c5d2e3b037
commit b2015c8fe5

14
index.d.ts vendored
View File

@@ -32,13 +32,13 @@ declare function signEvent(event: Event, key: PrivKey): Promise<[Uint8Array, num
// filter.js
declare type Filter = {
ids: string[],
kinds: EventKind[],
authors: string[],
since: number,
until: number,
"#e": string[],
"#p": string[],
ids?: string[],
kinds?: EventKind[],
authors?: string[],
since?: number,
until?: number,
"#e"?: string[],
"#p"?: string[],
};
declare function matchFilter(filter: Filter, event: Event): boolean;