Enable @typescript-eslint/explicit-function-return-type
in /src (#9788)
* Enable `@typescript-eslint/explicit-member-accessibility` on /src * Prettier * Enable `@typescript-eslint/explicit-function-return-type` in /src * Fix types * tsc strict fixes * Delint * Fix test * Fix bad merge
This commit is contained in:
parent
7a36ba0fde
commit
030b7e90bf
683 changed files with 3459 additions and 3013 deletions
|
@ -46,7 +46,7 @@ export default class PlainTextExporter extends Exporter {
|
|||
return this.makeFileNameNoExtension() + ".txt";
|
||||
}
|
||||
|
||||
public textForReplyEvent = (content: IContent) => {
|
||||
public textForReplyEvent = (content: IContent): string => {
|
||||
const REPLY_REGEX = /> <(.*?)>(.*?)\n\n(.*)/s;
|
||||
const REPLY_SOURCE_MAX_LENGTH = 32;
|
||||
|
||||
|
@ -79,7 +79,7 @@ export default class PlainTextExporter extends Exporter {
|
|||
return `<${rplName}${rplSource}> ${rplText}`;
|
||||
};
|
||||
|
||||
protected plainTextForEvent = async (mxEv: MatrixEvent) => {
|
||||
protected plainTextForEvent = async (mxEv: MatrixEvent): Promise<string> => {
|
||||
const senderDisplayName = mxEv.sender && mxEv.sender.name ? mxEv.sender.name : mxEv.getSender();
|
||||
let mediaText = "";
|
||||
if (this.isAttachment(mxEv)) {
|
||||
|
@ -107,7 +107,7 @@ export default class PlainTextExporter extends Exporter {
|
|||
else return textForEvent(mxEv) + mediaText;
|
||||
};
|
||||
|
||||
protected async createOutput(events: MatrixEvent[]) {
|
||||
protected async createOutput(events: MatrixEvent[]): Promise<string> {
|
||||
let content = "";
|
||||
for (let i = 0; i < events.length; i++) {
|
||||
const event = events[i];
|
||||
|
@ -127,7 +127,7 @@ export default class PlainTextExporter extends Exporter {
|
|||
return content;
|
||||
}
|
||||
|
||||
public async export() {
|
||||
public async export(): Promise<void> {
|
||||
this.updateProgress(_t("Starting export process..."));
|
||||
this.updateProgress(_t("Fetching events..."));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue