page state type fixes: (#488)

- ensure pageid always inited for pagestate
- remove generic any from PageState
- use WorkerState instead of internal WorkerOpts
This commit is contained in:
Ilya Kreymer 2024-03-08 11:05:26 -08:00 committed by GitHub
parent 9f18a49c0a
commit 3b6c11d77b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 13 deletions

View file

@ -33,7 +33,7 @@ import { Screenshots } from "./util/screenshots.js";
import { parseArgs } from "./util/argParser.js";
import { initRedis } from "./util/redis.js";
import { logger, formatErr } from "./util/logger.js";
import { WorkerOpts, WorkerState, runWorkers } from "./util/worker.js";
import { WorkerState, runWorkers } from "./util/worker.js";
import { sleep, timedRun, secondsElapsed } from "./util/timing.js";
import { collectAllFileSources } from "./util/file_reader.js";
@ -869,7 +869,7 @@ self.__bx_behaviors.selectMainBehavior();
await this.checkLimits();
}
async teardownPage({ workerid }: WorkerOpts) {
async teardownPage({ workerid }: WorkerState) {
if (this.screencaster) {
await this.screencaster.stopById(workerid);
}