1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Correct TypeScript signature of client.sendCompleteEvent (#1997)

* Correct TypeScript signature of client.sendCompleteEvent

* Revert renaming txnId to txnIdOrCallback
This commit is contained in:
Christian Paul
2021-10-25 22:25:38 +02:00
committed by GitHub
parent 7ce0eb26d4
commit 51c776f51e

View File

@@ -3405,7 +3405,7 @@ export class MatrixClient extends EventEmitter {
/**
* @param {string} roomId
* @param {object} eventObject An object with the partial structure of an event, to which event_id, user_id, room_id and origin_server_ts will be added.
* @param {string} txnId the txnId.
* @param {string} txnId Optional.
* @param {module:client.callback} callback Optional.
* @return {Promise} Resolves: to an empty object {}
* @return {module:http-api.MatrixError} Rejects: with an error response.
@@ -3413,7 +3413,7 @@ export class MatrixClient extends EventEmitter {
private sendCompleteEvent(
roomId: string,
eventObject: any,
txnId: string,
txnId?: string,
callback?: Callback,
): Promise<ISendEventResponse> {
if (utils.isFunction(txnId)) {