From c65ce1b673438ddde83a3775603f53380e3d8ff6 Mon Sep 17 00:00:00 2001 From: Simon Laux Date: Sat, 2 Nov 2024 14:40:04 +0100 Subject: [PATCH] export `Event` and `ContextEvents` type to include them in the documentation. --- deltachat-jsonrpc/typescript/src/client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deltachat-jsonrpc/typescript/src/client.ts b/deltachat-jsonrpc/typescript/src/client.ts index dd0c6e32b..5d10ccbb8 100644 --- a/deltachat-jsonrpc/typescript/src/client.ts +++ b/deltachat-jsonrpc/typescript/src/client.ts @@ -5,14 +5,14 @@ import { RawClient } from "../generated/client.js"; import { BaseTransport, Request } from "yerpc"; import { TinyEmitter } from "@deltachat/tiny-emitter"; -type Events = { ALL: (accountId: number, event: EventType) => void } & { +export type Events = { ALL: (accountId: number, event: EventType) => void } & { [Property in EventType["kind"]]: ( accountId: number, event: Extract, ) => void; }; -type ContextEvents = { ALL: (event: EventType) => void } & { +export type ContextEvents = { ALL: (event: EventType) => void } & { [Property in EventType["kind"]]: ( event: Extract, ) => void;