Add type def for custom reaction type.

This commit is contained in:
Half-Shot
2024-11-05 15:24:16 +00:00
parent d5122f670a
commit 05b56c7057
2 changed files with 20 additions and 3 deletions

18
src/@types/matrix-js-sdk.d.ts vendored Normal file
View File

@@ -0,0 +1,18 @@
/*
Copyright 2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only
Please see LICENSE in the repository root for full details.
*/
import {
ElementCallReactionEventType,
ECallReactionEventContent,
} from "../reactions";
// Extend Matrix JS SDK types via Typescript declaration merging to support unspecced event fields and types
declare module "matrix-js-sdk/src/types" {
export interface TimelineEvents {
[ElementCallReactionEventType]: ECallReactionEventContent;
}
}