Fix strict TypeScript checks for server

This commit is contained in:
nav
2026-04-09 04:38:07 +00:00
parent 2972c4750e
commit 31f41cb49b
7 changed files with 52 additions and 14 deletions

View File

@@ -52,6 +52,7 @@ export interface YonexusServerRuntimeOptions {
config: YonexusServerConfig;
store: YonexusServerStore;
transport: ServerTransport;
notificationService?: DiscordNotificationService;
now?: () => number;
sweepIntervalMs?: number;
}
@@ -80,10 +81,12 @@ export class YonexusServerRuntime {
};
this.sweepIntervalMs = options.sweepIntervalMs ?? 30_000;
this.pairingService = createPairingService({ now: this.now });
this.notificationService = createDiscordNotificationService({
botToken: options.config.notifyBotToken,
adminUserId: options.config.adminUserId
});
this.notificationService =
options.notificationService ??
createDiscordNotificationService({
botToken: options.config.notifyBotToken,
adminUserId: options.config.adminUserId
});
}
get state(): ServerLifecycleState {