refactor: compose investigation record ownership (#845)

This commit is contained in:
N0zoM1z0
2026-10-07 12:10:45 +08:00
committed by GitHub
parent bc2cd8b874
commit ce73c3fed2
27 changed files with 627 additions and 127 deletions
+6 -2
View File
@@ -24,6 +24,7 @@ import {
SessionProviderRouter,
type SessionProviderRoute,
} from "./SessionProviderRouter.js";
import { InvestigationRecords } from "./investigation/InvestigationRecords.js";
import { BinarySessionRecords } from "./BinarySessionRecords.js";
import { binarySessionStatus } from "./BinarySessionStatus.js";
import {
@@ -78,8 +79,11 @@ export class BinarySession
>();
readonly #availabilityListeners = new Set<() => void | Promise<void>>();
constructor(providerRouter: SessionProviderRouter) {
super();
constructor(
providerRouter: SessionProviderRouter,
records: InvestigationRecords = new InvestigationRecords(),
) {
super(records);
this.#providerRouter = providerRouter;
}