refactor: Convert protected methods to private (#2358)

This commit is contained in:
Dermot Duffy
2026-02-19 20:47:59 -08:00
committed by GitHub
parent 529500ed94
commit 0a67df9a25
122 changed files with 815 additions and 829 deletions
+3 -3
View File
@@ -45,9 +45,9 @@ const getIcon = (mediaClass: string): string | null => {
};
export class BrowseMediaEventViewMedia extends ViewMedia implements EventViewMedia {
protected _browseMedia: RichBrowseMedia<BrowseMediaMetadata | undefined>;
protected _id: string;
protected _icon: string | null;
private _browseMedia: RichBrowseMedia<BrowseMediaMetadata | undefined>;
private _id: string;
private _icon: string | null;
constructor(
mediaType: ViewMediaType,
+2 -2
View File
@@ -68,7 +68,7 @@ export class BrowseMediaWalker {
).flat();
}
protected async _walkBrowseMedia<M>(
private async _walkBrowseMedia<M>(
hass: HomeAssistant,
step: BrowseMediaStep<M>,
options?: {
@@ -111,7 +111,7 @@ export class BrowseMediaWalker {
return await this.walk(hass, nextSteps, options);
}
protected async _browseMedia<M>(
private async _browseMedia<M>(
hass: HomeAssistant,
target: string | RichBrowseMedia<M>,
options?: {
+3 -3
View File
@@ -4,8 +4,8 @@ import { homeAssistantWSRequest } from '../../ws-request';
import { Device, DeviceCache, DeviceList, deviceListSchema } from './types';
export class DeviceRegistryManager {
protected _cache: DeviceCache;
protected _fetchedDeviceList = false;
private _cache: DeviceCache;
private _fetchedDeviceList = false;
constructor(cache: DeviceCache) {
this._cache = cache;
@@ -29,7 +29,7 @@ export class DeviceRegistryManager {
return this._cache.getMatches(func);
}
protected async _fetchDeviceList(hass: HomeAssistant): Promise<void> {
private async _fetchDeviceList(hass: HomeAssistant): Promise<void> {
if (this._fetchedDeviceList) {
return;
}
+2 -2
View File
@@ -15,8 +15,8 @@ import {
// non-trivial in size (after which they are cached forever).
export class EntityRegistryManagerLive implements EntityRegistryManager {
protected _cache: EntityCache;
protected _fetchedEntityList = false;
private _cache: EntityCache;
private _fetchedEntityList = false;
constructor(cache: EntityCache) {
this._cache = cache;