Replace typescript-private methods with native-private
Author: janbucharCreated Aug 21, 2026Updated Aug 21, 2026
Labelst-tooling
- #3980 and #3983 covered class properties. Methods were never in scope, but
crawlee/prefer-private-fieldsflags them too - on
master, there's 200+ private methods - until we resolve this, we cannot make
prefer-private-fieldsan error instead of warning
Spy seams
A test asserts a private method was called, so # breaks it outright rather than needing a rewrite.
BrowserPool.executeHooks(8 sites),launchBrowser(2),overridePageClose,closeRetiredBrowserWithNoPages,closeInactiveRetiredBrowsersConcurrencySystem.autoscale(9) — tests step the autoscaling loop by hand. Also doesthis.autoscale = this.autoscale.bind(this)in the constructor, which is illegal for a#method; it would have to become a private field holding an arrow function.SessionPool.ensureInitialized(3),createSession
Internals invoked directly
No public path to the behaviour under test.
BasicCrawler.resolveRequestHandlerTimeoutMillis— currently the only handle on the 2^31-1 clamp, see #4043BasicCrawler.isTaskReadyFunction,runInStorageTransaction,isAllowedBasedOnRobotsTxtFile(2)HttpCrawler.encodeResponse(2)ImpitHttpClient.getClient(4) — asserts per-proxy client cachingBrowserLauncher.getTypicalChromeExecutablePath(3)StagehandController.waitForStagehandToRegisterPage(2)Dataset.bufferedJournalEntries/KeyValueStore.bufferedJournalEntriesRelated: #3108, #3980, #3983
Source: apify/crawlee