Enable @typescript-eslint/explicit-member-accessibility on /src (#9785)

* Enable `@typescript-eslint/explicit-member-accessibility` on /src

* Prettier
This commit is contained in:
Michael Telatynski 2022-12-16 12:29:59 +00:00 committed by GitHub
parent 51554399fb
commit f1e8e7f140
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
396 changed files with 1110 additions and 1098 deletions

View file

@ -21,13 +21,13 @@ export class WidgetType {
public static readonly INTEGRATION_MANAGER = new WidgetType("m.integration_manager", "m.integration_manager");
public static readonly CUSTOM = new WidgetType("m.custom", "m.custom");
constructor(public readonly preferred: string, public readonly legacy: string) {}
public constructor(public readonly preferred: string, public readonly legacy: string) {}
public matches(type: string): boolean {
return type === this.preferred || type === this.legacy;
}
static fromString(type: string): WidgetType {
public static fromString(type: string): WidgetType {
// First try and match it against something we're already aware of
const known = Object.values(WidgetType).filter((v) => v instanceof WidgetType);
const knownMatch = known.find((w) => w.matches(type));