diff --git a/src/models/event.ts b/src/models/event.ts index 3c5f19a46..09cc59204 100644 --- a/src/models/event.ts +++ b/src/models/event.ts @@ -265,11 +265,11 @@ export class MatrixEvent extends EventEmitter { /** * 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. - * @returns {Partial} The clear event, as known by the SDK. + * @returns {IEvent} The clear event, as known by the SDK. */ - public getClearEvent(): Partial { + public getClearEvent(): IEvent { // 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; } /**