Enable @typescript-eslint/explicit-member-accessibility
on /src (#9785)
* Enable `@typescript-eslint/explicit-member-accessibility` on /src * Prettier
This commit is contained in:
parent
51554399fb
commit
f1e8e7f140
396 changed files with 1110 additions and 1098 deletions
|
@ -70,7 +70,7 @@ export default abstract class BaseEventIndexManager {
|
|||
* @return {Promise} A promise that will resolve to true if event indexing
|
||||
* is supported, false otherwise.
|
||||
*/
|
||||
async supportsEventIndexing(): Promise<boolean> {
|
||||
public async supportsEventIndexing(): Promise<boolean> {
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
|
@ -82,7 +82,7 @@ export default abstract class BaseEventIndexManager {
|
|||
* @return {Promise} A promise that will resolve when the event index is
|
||||
* initialized.
|
||||
*/
|
||||
async initEventIndex(userId: string, deviceId: string): Promise<void> {
|
||||
public async initEventIndex(userId: string, deviceId: string): Promise<void> {
|
||||
throw new Error("Unimplemented");
|
||||
}
|
||||
|
||||
|
@ -96,22 +96,22 @@ export default abstract class BaseEventIndexManager {
|
|||
* @return {Promise} A promise that will resolve when the was queued up for
|
||||
* addition.
|
||||
*/
|
||||
async addEventToIndex(ev: IMatrixEvent, profile: IMatrixProfile): Promise<void> {
|
||||
public async addEventToIndex(ev: IMatrixEvent, profile: IMatrixProfile): Promise<void> {
|
||||
throw new Error("Unimplemented");
|
||||
}
|
||||
|
||||
async deleteEvent(eventId: string): Promise<boolean> {
|
||||
public async deleteEvent(eventId: string): Promise<boolean> {
|
||||
throw new Error("Unimplemented");
|
||||
}
|
||||
|
||||
async isEventIndexEmpty(): Promise<boolean> {
|
||||
public async isEventIndexEmpty(): Promise<boolean> {
|
||||
throw new Error("Unimplemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if our event index is empty.
|
||||
*/
|
||||
indexIsEmpty(): Promise<boolean> {
|
||||
public indexIsEmpty(): Promise<boolean> {
|
||||
throw new Error("Unimplemented");
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,7 @@ export default abstract class BaseEventIndexManager {
|
|||
* @return {Promise<boolean>} Returns true if the index contains events for
|
||||
* the given room, false otherwise.
|
||||
*/
|
||||
isRoomIndexed(roomId: string): Promise<boolean> {
|
||||
public isRoomIndexed(roomId: string): Promise<boolean> {
|
||||
throw new Error("Unimplemented");
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ export default abstract class BaseEventIndexManager {
|
|||
* @return {Promise<IIndexStats>} A promise that will resolve to the index
|
||||
* statistics.
|
||||
*/
|
||||
async getStats(): Promise<IIndexStats> {
|
||||
public async getStats(): Promise<IIndexStats> {
|
||||
throw new Error("Unimplemented");
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ export default abstract class BaseEventIndexManager {
|
|||
* @return {Promise<number>} A promise that will resolve to the user stored
|
||||
* version number.
|
||||
*/
|
||||
async getUserVersion(): Promise<number> {
|
||||
public async getUserVersion(): Promise<number> {
|
||||
throw new Error("Unimplemented");
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ export default abstract class BaseEventIndexManager {
|
|||
* @return {Promise<void>} A promise that will resolve once the new version
|
||||
* is stored.
|
||||
*/
|
||||
async setUserVersion(version: number): Promise<void> {
|
||||
public async setUserVersion(version: number): Promise<void> {
|
||||
throw new Error("Unimplemented");
|
||||
}
|
||||
|
||||
|
@ -166,7 +166,7 @@ export default abstract class BaseEventIndexManager {
|
|||
* @return {Promise} A promise that will resolve once the queued up events
|
||||
* were added to the index.
|
||||
*/
|
||||
async commitLiveEvents(): Promise<void> {
|
||||
public async commitLiveEvents(): Promise<void> {
|
||||
throw new Error("Unimplemented");
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ export default abstract class BaseEventIndexManager {
|
|||
* @return {Promise<IResultRoomEvents[]>} A promise that will resolve to an array
|
||||
* of search results once the search is done.
|
||||
*/
|
||||
async searchEventIndex(searchArgs: ISearchArgs): Promise<IResultRoomEvents> {
|
||||
public async searchEventIndex(searchArgs: ISearchArgs): Promise<IResultRoomEvents> {
|
||||
throw new Error("Unimplemented");
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ export default abstract class BaseEventIndexManager {
|
|||
* @return {Promise} A promise that will resolve to true if all the events
|
||||
* were already added to the index, false otherwise.
|
||||
*/
|
||||
async addHistoricEvents(
|
||||
public async addHistoricEvents(
|
||||
events: IEventAndProfile[],
|
||||
checkpoint: ICrawlerCheckpoint | null,
|
||||
oldCheckpoint: ICrawlerCheckpoint | null,
|
||||
|
@ -217,7 +217,7 @@ export default abstract class BaseEventIndexManager {
|
|||
* @return {Promise} A promise that will resolve once the checkpoint has
|
||||
* been stored.
|
||||
*/
|
||||
async addCrawlerCheckpoint(checkpoint: ICrawlerCheckpoint): Promise<void> {
|
||||
public async addCrawlerCheckpoint(checkpoint: ICrawlerCheckpoint): Promise<void> {
|
||||
throw new Error("Unimplemented");
|
||||
}
|
||||
|
||||
|
@ -230,7 +230,7 @@ export default abstract class BaseEventIndexManager {
|
|||
* @return {Promise} A promise that will resolve once the checkpoint has
|
||||
* been removed.
|
||||
*/
|
||||
async removeCrawlerCheckpoint(checkpoint: ICrawlerCheckpoint): Promise<void> {
|
||||
public async removeCrawlerCheckpoint(checkpoint: ICrawlerCheckpoint): Promise<void> {
|
||||
throw new Error("Unimplemented");
|
||||
}
|
||||
|
||||
|
@ -240,7 +240,7 @@ export default abstract class BaseEventIndexManager {
|
|||
* @return {Promise<[ICrawlerCheckpoint]>} A promise that will resolve to an
|
||||
* array of crawler checkpoints once they have been loaded from the index.
|
||||
*/
|
||||
async loadCheckpoints(): Promise<ICrawlerCheckpoint[]> {
|
||||
public async loadCheckpoints(): Promise<ICrawlerCheckpoint[]> {
|
||||
throw new Error("Unimplemented");
|
||||
}
|
||||
|
||||
|
@ -260,7 +260,7 @@ export default abstract class BaseEventIndexManager {
|
|||
* array of Matrix events that contain mxc URLs accompanied with the
|
||||
* historic profile of the sender.
|
||||
*/
|
||||
async loadFileEvents(args: ILoadArgs): Promise<IEventAndProfile[]> {
|
||||
public async loadFileEvents(args: ILoadArgs): Promise<IEventAndProfile[]> {
|
||||
throw new Error("Unimplemented");
|
||||
}
|
||||
|
||||
|
@ -270,7 +270,7 @@ export default abstract class BaseEventIndexManager {
|
|||
* @return {Promise} A promise that will resolve once the event index has
|
||||
* been closed.
|
||||
*/
|
||||
async closeEventIndex(): Promise<void> {
|
||||
public async closeEventIndex(): Promise<void> {
|
||||
throw new Error("Unimplemented");
|
||||
}
|
||||
|
||||
|
@ -280,7 +280,7 @@ export default abstract class BaseEventIndexManager {
|
|||
* @return {Promise} A promise that will resolve once the event index has
|
||||
* been deleted.
|
||||
*/
|
||||
async deleteEventIndex(): Promise<void> {
|
||||
public async deleteEventIndex(): Promise<void> {
|
||||
throw new Error("Unimplemented");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ export class EventIndexPeg {
|
|||
* @return {Promise<boolean>} A promise that will resolve to true if an
|
||||
* EventIndex was successfully initialized, false otherwise.
|
||||
*/
|
||||
async init() {
|
||||
public async init() {
|
||||
const indexManager = PlatformPeg.get().getEventIndexingManager();
|
||||
if (!indexManager) {
|
||||
logger.log("EventIndex: Platform doesn't support event indexing, not initializing.");
|
||||
|
@ -76,7 +76,7 @@ export class EventIndexPeg {
|
|||
* @returns {boolean} True if the event index was successfully initialized,
|
||||
* false otherwise.
|
||||
*/
|
||||
async initEventIndex() {
|
||||
public async initEventIndex() {
|
||||
const index = new EventIndex();
|
||||
const indexManager = PlatformPeg.get().getEventIndexingManager();
|
||||
const client = MatrixClientPeg.get();
|
||||
|
@ -119,7 +119,7 @@ export class EventIndexPeg {
|
|||
* @return {boolean} True if it has support, false otherwise. Note that this
|
||||
* does not mean that support is installed.
|
||||
*/
|
||||
platformHasSupport(): boolean {
|
||||
public platformHasSupport(): boolean {
|
||||
return PlatformPeg.get().getEventIndexingManager() !== null;
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ export class EventIndexPeg {
|
|||
*
|
||||
* @return {boolean} True if support is installed, false otherwise.
|
||||
*/
|
||||
supportIsInstalled(): boolean {
|
||||
public supportIsInstalled(): boolean {
|
||||
return this._supportIsInstalled;
|
||||
}
|
||||
|
||||
|
@ -141,16 +141,16 @@ export class EventIndexPeg {
|
|||
*
|
||||
* @return {EventIndex} The current event index.
|
||||
*/
|
||||
get() {
|
||||
public get() {
|
||||
return this.index;
|
||||
}
|
||||
|
||||
start() {
|
||||
public start() {
|
||||
if (this.index === null) return;
|
||||
this.index.startCrawler();
|
||||
}
|
||||
|
||||
stop() {
|
||||
public stop() {
|
||||
if (this.index === null) return;
|
||||
this.index.stopCrawler();
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ export class EventIndexPeg {
|
|||
* @return {Promise} A promise that will resolve once the event index is
|
||||
* closed.
|
||||
*/
|
||||
async unset() {
|
||||
public async unset() {
|
||||
if (this.index === null) return;
|
||||
await this.index.close();
|
||||
this.index = null;
|
||||
|
@ -177,7 +177,7 @@ export class EventIndexPeg {
|
|||
* @return {Promise} A promise that will resolve once the event index is
|
||||
* deleted.
|
||||
*/
|
||||
async deleteEventIndex() {
|
||||
public async deleteEventIndex() {
|
||||
const indexManager = PlatformPeg.get().getEventIndexingManager();
|
||||
|
||||
if (indexManager !== null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue