Improve types for sendStateEvent
(#12331)
This commit is contained in:
parent
4a05de485e
commit
2cbf92860b
17 changed files with 89 additions and 44 deletions
|
@ -291,7 +291,7 @@ Response:
|
|||
|
||||
*/
|
||||
|
||||
import { IContent, MatrixEvent, IEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { IContent, MatrixEvent, IEvent, StateEvents } from "matrix-js-sdk/src/matrix";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
import { MatrixClientPeg } from "./MatrixClientPeg";
|
||||
|
@ -721,7 +721,7 @@ async function getOpenIdToken(event: MessageEvent<any>): Promise<void> {
|
|||
|
||||
async function sendEvent(
|
||||
event: MessageEvent<{
|
||||
type: string;
|
||||
type: keyof StateEvents;
|
||||
state_key?: string;
|
||||
content?: IContent;
|
||||
}>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue