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
|
@ -22,7 +22,7 @@ import { TimelineRenderingType } from "../contexts/RoomContext";
|
|||
import type { ICompletion, ISelectionRange } from "./Autocompleter";
|
||||
|
||||
export interface ICommand {
|
||||
command: string | null;
|
||||
command: RegExpExecArray | null;
|
||||
range: {
|
||||
start: number;
|
||||
end: number;
|
||||
|
@ -59,7 +59,7 @@ export default abstract class AutocompleteProvider {
|
|||
}
|
||||
}
|
||||
|
||||
public destroy() {
|
||||
public destroy(): void {
|
||||
// stub
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ export default abstract class AutocompleteProvider {
|
|||
* @param {boolean} force True if the user is forcing completion
|
||||
* @return {object} { command, range } where both objects fields are null if no match
|
||||
*/
|
||||
public getCurrentCommand(query: string, selection: ISelectionRange, force = false) {
|
||||
public getCurrentCommand(query: string, selection: ISelectionRange, force = false): ICommand {
|
||||
let commandRegex = this.commandRegex;
|
||||
|
||||
if (force && this.shouldForceComplete()) {
|
||||
|
@ -83,7 +83,7 @@ export default abstract class AutocompleteProvider {
|
|||
|
||||
commandRegex.lastIndex = 0;
|
||||
|
||||
let match;
|
||||
let match: RegExpExecArray;
|
||||
while ((match = commandRegex.exec(query)) !== null) {
|
||||
const start = match.index;
|
||||
const end = start + match[0].length;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue