refactor: Convert protected methods to private (#2358)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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?: {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user