You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-23 17:02:25 +03:00
Improve tsdoc types (#2940)
* Install eslint-plugin-jsdoc * Enable lint rule jsdoc/no-types * Make tsdoc more valid, add required hyphens and s/return/returns/g * Stash tsdoc work * Fix mistypes * Stash * Stash * More tsdoc work * Remove useless doc params * Fixup docs * Apply suggestions from code review Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * Update src/crypto/verification/request/ToDeviceChannel.ts Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * Update src/client.ts Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * Update src/client.ts Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * Update src/client.ts Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * Iterate Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a9e7a46c56
commit
c4006d752a
@@ -458,7 +458,7 @@ export class SlidingSyncSdk {
|
||||
|
||||
/**
|
||||
* Sync rooms the user has left.
|
||||
* @return {Promise} Resolved when they've been added to the store.
|
||||
* @returns Resolved when they've been added to the store.
|
||||
*/
|
||||
public async syncLeftRooms(): Promise<Room[]> {
|
||||
return []; // TODO
|
||||
@@ -467,8 +467,8 @@ export class SlidingSyncSdk {
|
||||
/**
|
||||
* Peek into a room. This will result in the room in question being synced so it
|
||||
* is accessible via getRooms(). Live updates for the room will be provided.
|
||||
* @param {string} roomId The room ID to peek into.
|
||||
* @return {Promise} A promise which resolves once the room has been added to the
|
||||
* @param roomId - The room ID to peek into.
|
||||
* @returns A promise which resolves once the room has been added to the
|
||||
* store.
|
||||
*/
|
||||
public async peek(_roomId: string): Promise<Room> {
|
||||
@@ -485,8 +485,7 @@ export class SlidingSyncSdk {
|
||||
|
||||
/**
|
||||
* Returns the current state of this sync object
|
||||
* @see module:client~MatrixClient#event:"sync"
|
||||
* @return {?String}
|
||||
* @see MatrixClient#event:"sync"
|
||||
*/
|
||||
public getSyncState(): SyncState | null {
|
||||
return this.syncState;
|
||||
@@ -498,7 +497,6 @@ export class SlidingSyncSdk {
|
||||
* such data.
|
||||
* Sync errors, if available, are put in the 'error' key of
|
||||
* this object.
|
||||
* @return {?Object}
|
||||
*/
|
||||
public getSyncStateData(): ISyncStateData | null {
|
||||
return this.syncStateData ?? null;
|
||||
@@ -765,12 +763,11 @@ export class SlidingSyncSdk {
|
||||
|
||||
/**
|
||||
* Injects events into a room's model.
|
||||
* @param {Room} room
|
||||
* @param {MatrixEvent[]} stateEventList A list of state events. This is the state
|
||||
* @param stateEventList - A list of state events. This is the state
|
||||
* at the *START* of the timeline list if it is supplied.
|
||||
* @param {MatrixEvent[]} [timelineEventList] A list of timeline events. Lower index
|
||||
* @param timelineEventList - A list of timeline events. Lower index
|
||||
* is earlier in time. Higher index is later.
|
||||
* @param {number} numLive the number of events in timelineEventList which just happened,
|
||||
* @param numLive - the number of events in timelineEventList which just happened,
|
||||
* supplied from the server.
|
||||
*/
|
||||
public injectRoomEvents(
|
||||
@@ -933,8 +930,8 @@ export class SlidingSyncSdk {
|
||||
|
||||
/**
|
||||
* Sets the sync state and emits an event to say so
|
||||
* @param {String} newState The new state string
|
||||
* @param {Object} data Object of additional data to emit in the event
|
||||
* @param newState - The new state string
|
||||
* @param data - Object of additional data to emit in the event
|
||||
*/
|
||||
private updateSyncState(newState: SyncState, data?: ISyncStateData): void {
|
||||
const old = this.syncState;
|
||||
@@ -948,7 +945,7 @@ export class SlidingSyncSdk {
|
||||
* as appropriate.
|
||||
* This must be called after the room the events belong to has been stored.
|
||||
*
|
||||
* @param {MatrixEvent[]} [timelineEventList] A list of timeline events. Lower index
|
||||
* @param timelineEventList - A list of timeline events. Lower index
|
||||
* is earlier in time. Higher index is later.
|
||||
*/
|
||||
private addNotifications(timelineEventList: MatrixEvent[]): void {
|
||||
|
||||
Reference in New Issue
Block a user