1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-05 00:42:10 +03:00

Fix typedoc warnings (#3275)

There aren't that many of these, so I've gone through and fixed them, and
configured the GHA workflow to complain if any creep back in.
This commit is contained in:
Richard van der Hoff
2023-04-12 21:30:57 +01:00
committed by GitHub
parent 72af8c193c
commit b9d0596dd7
7 changed files with 14 additions and 14 deletions

View File

@@ -65,7 +65,7 @@ jobs:
run: "yarn install" run: "yarn install"
- name: Generate Docs - name: Generate Docs
run: "yarn run gendoc" run: "yarn run gendoc --treatWarningsAsErrors"
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3

View File

@@ -2278,7 +2278,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
* @param userIds - The users to fetch. * @param userIds - The users to fetch.
* @param forceDownload - Always download the keys even if cached. * @param forceDownload - Always download the keys even if cached.
* *
* @returns A promise which resolves to a map userId-\>deviceId-\>{@link DeviceInfo} * @returns A promise which resolves to a map userId-\>deviceId-\>`DeviceInfo`
*/ */
public downloadKeys(userIds: string[], forceDownload?: boolean): Promise<DeviceInfoMap> { public downloadKeys(userIds: string[], forceDownload?: boolean): Promise<DeviceInfoMap> {
if (!this.crypto) { if (!this.crypto) {

View File

@@ -1778,8 +1778,7 @@ export class Crypto extends TypedEventEmitter<CryptoEvent, CryptoEventHandlerMap
* *
* @param value - whether to blacklist all unverified devices by default * @param value - whether to blacklist all unverified devices by default
* *
* @deprecated For external code, use {@link MatrixClient#setGlobalBlacklistUnverifiedDevices}. For * @deprecated Set {@link CryptoApi#globalBlacklistUnverifiedDevices | CryptoApi.globalBlacklistUnverifiedDevices} directly.
* internal code, set {@link MatrixClient#globalBlacklistUnverifiedDevices} directly.
*/ */
public setGlobalBlacklistUnverifiedDevices(value: boolean): void { public setGlobalBlacklistUnverifiedDevices(value: boolean): void {
this.globalBlacklistUnverifiedDevices = value; this.globalBlacklistUnverifiedDevices = value;
@@ -1788,8 +1787,7 @@ export class Crypto extends TypedEventEmitter<CryptoEvent, CryptoEventHandlerMap
/** /**
* @returns whether to blacklist all unverified devices by default * @returns whether to blacklist all unverified devices by default
* *
* @deprecated For external code, use {@link MatrixClient#getGlobalBlacklistUnverifiedDevices}. For * @deprecated Reference {@link CryptoApi#globalBlacklistUnverifiedDevices | CryptoApi.globalBlacklistUnverifiedDevices} directly.
* internal code, reference {@link MatrixClient#globalBlacklistUnverifiedDevices} directly.
*/ */
public getGlobalBlacklistUnverifiedDevices(): boolean { public getGlobalBlacklistUnverifiedDevices(): boolean {
return this.globalBlacklistUnverifiedDevices; return this.globalBlacklistUnverifiedDevices;
@@ -2666,7 +2664,7 @@ export class Crypto extends TypedEventEmitter<CryptoEvent, CryptoEventHandlerMap
* *
* @returns resolves once the sessions are complete, to * @returns resolves once the sessions are complete, to
* an Object mapping from userId to deviceId to * an Object mapping from userId to deviceId to
* {@link OlmSessionResult} * `IOlmSessionResult`
*/ */
public ensureOlmSessionsForUsers( public ensureOlmSessionsForUsers(
users: string[], users: string[],
@@ -3767,7 +3765,7 @@ export class Crypto extends TypedEventEmitter<CryptoEvent, CryptoEventHandlerMap
* *
* @param algorithm - crypto algorithm * @param algorithm - crypto algorithm
* *
* @throws {@link DecryptionError} if the algorithm is unknown * @throws `DecryptionError` if the algorithm is unknown
*/ */
public getRoomDecryptor(roomId: string | null, algorithm: string): DecryptionAlgorithm { public getRoomDecryptor(roomId: string | null, algorithm: string): DecryptionAlgorithm {
let decryptors: Map<string, DecryptionAlgorithm> | undefined; let decryptors: Map<string, DecryptionAlgorithm> | undefined;

View File

@@ -211,7 +211,7 @@ export interface OutgoingRoomKeyRequest {
*/ */
requestBody: IRoomKeyRequestBody; requestBody: IRoomKeyRequestBody;
/** /**
* current state of this request (states are defined in {@link OutgoingRoomKeyRequestManager}) * current state of this request
*/ */
state: RoomKeyRequestState; state: RoomKeyRequestState;
} }

View File

@@ -97,7 +97,7 @@ export interface IAuthDict {
token?: string; token?: string;
} }
class NoAuthFlowFoundError extends Error { export class NoAuthFlowFoundError extends Error {
public name = "NoAuthFlowFoundError"; public name = "NoAuthFlowFoundError";
// eslint-disable-next-line @typescript-eslint/naming-convention, camelcase // eslint-disable-next-line @typescript-eslint/naming-convention, camelcase

View File

@@ -47,6 +47,7 @@ export * from "./store/memory";
export * from "./store/indexeddb"; export * from "./store/indexeddb";
export * from "./crypto/store/memory-crypto-store"; export * from "./crypto/store/memory-crypto-store";
export * from "./crypto/store/indexeddb-crypto-store"; export * from "./crypto/store/indexeddb-crypto-store";
export { OutgoingRoomKeyRequest } from "./crypto/store/base";
export * from "./content-repo"; export * from "./content-repo";
export * from "./@types/event"; export * from "./@types/event";
export * from "./@types/PushRules"; export * from "./@types/PushRules";
@@ -62,13 +63,14 @@ export type { MatrixCall } from "./webrtc/call";
export { GroupCallEvent, GroupCallIntent, GroupCallState, GroupCallType } from "./webrtc/groupCall"; export { GroupCallEvent, GroupCallIntent, GroupCallState, GroupCallType } from "./webrtc/groupCall";
export type { GroupCall } from "./webrtc/groupCall"; export type { GroupCall } from "./webrtc/groupCall";
export type { CryptoApi } from "./crypto-api"; export type { CryptoApi } from "./crypto-api";
export { CryptoEvent } from "./crypto";
let cryptoStoreFactory = (): CryptoStore => new MemoryCryptoStore(); let cryptoStoreFactory = (): CryptoStore => new MemoryCryptoStore();
/** /**
* Configure a different factory to be used for creating crypto stores * Configure a different factory to be used for creating crypto stores
* *
* @param fac - a function which will return a new {@link CryptoStore} * @param fac - a function which will return a new `CryptoStore`
*/ */
export function setCryptoStoreFactory(fac: () => CryptoStore): void { export function setCryptoStoreFactory(fac: () => CryptoStore): void {
cryptoStoreFactory = fac; cryptoStoreFactory = fac;

View File

@@ -1923,7 +1923,7 @@ export class Room extends ReadReceipt<RoomEmittedEvents, RoomEventHandlerMap> {
/** /**
* Processes poll events: * Processes poll events:
* If the event has a decryption failure, it will listen for decryption and tries again. * If the event has a decryption failure, it will listen for decryption and tries again.
* If it is a poll start event ({@link M_POLL_START}), * If it is a poll start event (`m.poll.start`),
* it creates and stores a Poll model and emits a PollEvent.New event. * it creates and stores a Poll model and emits a PollEvent.New event.
* If the event is related to a poll, it will add it to the poll. * If the event is related to a poll, it will add it to the poll.
* Noop for other cases. * Noop for other cases.