Skip to content

Commit

Permalink
refactor: ♻️ use SatelliteGroup interface
Browse files Browse the repository at this point in the history
  • Loading branch information
thkruz committed Jan 9, 2024
1 parent de3a0c7 commit 126c9b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/viewer/SatelliteGroups.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import SatGroup from './SatelliteGroup';
import logger from '../utils/logger';
import SatelliteStore from './SatelliteStore';
import type SatelliteGroup from './SatelliteGroup';

class SatelliteGroups {
groups: Record<string, SatGroup> = {};
selectedGroup?: SatGroup;
sats: any[] = [];
satelliteStore: SatelliteStore;

constructor (satelliteGroups: Record<string, any>[], satelliteStore: SatelliteStore) {
constructor (satelliteGroups: SatelliteGroup[], satelliteStore: SatelliteStore) {
if (!satelliteStore) {
throw new Error('satelliteStore is required');
}
Expand Down Expand Up @@ -59,7 +60,7 @@ class SatelliteGroups {
}
}

resetConfig (satelliteGroups: Record<string, any>[]) {
resetConfig (satelliteGroups: SatelliteGroup[]) {
const groupConfigs = satelliteGroups;
for (let i = 0; i < groupConfigs.length; i++) {
logger.debug(`registering satellite group ${groupConfigs[i].name} (id: ${groupConfigs[i].id})`);
Expand Down

0 comments on commit 126c9b1

Please sign in to comment.