update interface to not be async

This commit is contained in:
2025-02-02 13:07:42 -08:00
parent 899b953be5
commit ec62b0c8bf
2 changed files with 4 additions and 4 deletions

View File

@@ -27,14 +27,14 @@ export interface GetterRepository {
*/ */
subscribeToEtaChanges( subscribeToEtaChanges(
listener: (eta: IEta) => void, listener: (eta: IEta) => void,
): Promise<void>; ): void;
/** /**
* Unsubscribe from all ETA updates for the given callback. * Unsubscribe from all ETA updates for the given callback.
* Callback must be passed by reference. * Callback must be passed by reference.
* @param listener * @param listener
*/ */
unsubscribeFromEtaChanges(listener: (eta: IEta) => void): Promise<void>; unsubscribeFromEtaChanges(listener: (eta: IEta) => void): void;
getOrderedStopByRouteAndStopId(routeId: string, stopId: string): Promise<IOrderedStop | null>; getOrderedStopByRouteAndStopId(routeId: string, stopId: string): Promise<IOrderedStop | null>;

View File

@@ -58,10 +58,10 @@ export class UnoptimizedInMemoryRepository implements GetterSetterRepository {
return this.etas.filter(eta => eta.stopId === stopId); return this.etas.filter(eta => eta.stopId === stopId);
} }
public async subscribeToEtaChanges(listener: (eta: IEta) => void): Promise<void> { public subscribeToEtaChanges(listener: (eta: IEta) => void) {
} }
public async unsubscribeFromEtaChanges(listener: (eta: IEta) => void): Promise<void> { public unsubscribeFromEtaChanges(listener: (eta: IEta) => void) {
} }
public async getEtaForShuttleAndStopId(shuttleId: string, stopId: string) { public async getEtaForShuttleAndStopId(shuttleId: string, stopId: string) {