Conversation
| /** | ||
| * @param 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 txnId - Optional. | ||
| * @returns Promise which resolves: to an empty object `{}` | ||
| * @returns Rejects: with an error response. | ||
| */ | ||
| private sendCompleteEvent(params: { |
There was a problem hiding this comment.
Losing docs seems like a bad thing
| private sendCompleteEvent(params: { | ||
| roomId: string; | ||
| threadId: string | null; | ||
| eventObject: Partial<IEvent>; | ||
| queryDict?: QueryDict; | ||
| queryDict: SendDelayedEventRequestOpts; | ||
| txnId?: string; | ||
| }): Promise<SendDelayedEventResponse>; | ||
| private sendCompleteEvent(params: { | ||
| roomId: string; | ||
| threadId: string | null; | ||
| eventObject: Partial<IEvent>; | ||
| queryDict: QueryDict & SendDelayedEventRequestOpts; | ||
| txnId?: string; | ||
| }): Promise<SendDelayedEventResponse>; | ||
| private sendCompleteEvent(params: { | ||
| roomId: string; | ||
| threadId: string | null; | ||
| eventObject: Partial<IEvent>; | ||
| queryDict?: QueryDict | SendStickyEventRequestOpts; | ||
| txnId?: string; | ||
| }): Promise<ISendEventResponse>; |
There was a problem hiding this comment.
This overload doesn't seem to add anything over the implementation signature?
There was a problem hiding this comment.
This overload is only there to type the response.
I am not sure if there is a better way to do this in ts.
Based on a key existing in queryDict we either return
SendDelayedEventResponse or ISendEventResponse ({delayId: string} and {eventId: string} respectivly)
Any good idea on this would be gold!
|
Please make sure your review is ready for review (i.e has a changelog-worthy title) before marking it as ready. Some context in the PR description would be good too. As well as passing CI. |
This was totally intended to be a draft. It is also not even against the develop branch. I am very sorry that I set its status to ready to review. |
Checklist
public/exportedsymbols have accurate TSDoc documentation.