Apply lint rule @typescript-eslint/no-empty-object-type (#29159)

* Apply lint rule @typescript-eslint/no-empty-object-type

To avoid the footgun that is https://www.totaltypescript.com/the-empty-object-type-in-typescript

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2025-02-04 13:41:34 +00:00
committed by GitHub
parent 8cae1e9f5e
commit 7eb969bbc2
56 changed files with 157 additions and 158 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ import { removeHiddenChars } from "matrix-js-sdk/src/utils";
import { TimelineRenderingType } from "../contexts/RoomContext";
import { Leaves } from "../@types/common";
interface IOptions<T extends {}> {
interface IOptions<T extends object> {
keys: Array<Leaves<T>>;
funcs?: Array<(o: T) => string | string[]>;
shouldMatchWordsOnly?: boolean;
@@ -37,7 +37,7 @@ interface IOptions<T extends {}> {
* @param {function[]} options.funcs List of functions that when called with the
* object as an arg will return a string to use as an index
*/
export default class QueryMatcher<T extends {}> {
export default class QueryMatcher<T extends object> {
private _options: IOptions<T>;
private _items = new Map<string, { object: T; keyWeight: number }[]>();