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

It's not a partial anymore

This commit is contained in:
Travis Ralston
2021-07-14 10:09:23 -06:00
parent 326b14402f
commit ea4dfd003f

View File

@@ -265,11 +265,11 @@ export class MatrixEvent extends EventEmitter {
/** /**
* Gets the clear event as it would be received over the wire. If the event * Gets the clear event as it would be received over the wire. If the event
* is not encrypted, this simply returns the event as-is. * is not encrypted, this simply returns the event as-is.
* @returns {Partial<IEvent>} The clear event, as known by the SDK. * @returns {IEvent} The clear event, as known by the SDK.
*/ */
public getClearEvent(): Partial<IEvent> { public getClearEvent(): IEvent {
// clearEvent doesn't have all the fields, so we'll copy what we can from this.event // clearEvent doesn't have all the fields, so we'll copy what we can from this.event
return Object.assign({}, this.event, this.clearEvent); return Object.assign({}, this.event, this.clearEvent) as IEvent;
} }
/** /**