ditto/src/types.ts

22 lines
617 B
TypeScript
Raw Normal View History

2023-08-24 22:00:08 +00:00
import { UserRow } from '@/db.ts';
import { type Filter } from '@/deps.ts';
/** Custom filter interface that extends Nostr filters with extra options for Ditto. */
interface DittoFilter<K extends number = number> extends Filter<K> {
local?: boolean;
}
/** Additional options to apply to the whole subscription. */
interface GetFiltersOpts {
2023-08-17 02:38:21 +00:00
/** How long to wait (in milliseconds) until aborting the request. */
timeout?: number;
2023-08-17 02:38:21 +00:00
/** Event limit for the whole subscription. */
limit?: number;
}
2023-08-24 22:00:08 +00:00
interface EventData {
user: UserRow | undefined;
}
export type { DittoFilter, EventData, GetFiltersOpts };