apify / browser-pool

A Node.js library to easily manage and rotate a pool of web browsers, using any of the popular browser automation libraries like Puppeteer, Playwright, or SecretAgent.
87 stars 14 forks source link

refactor: convert BrowserController to TS #36

Closed vladfrangu closed 3 years ago

vladfrangu commented 3 years ago

WIP: depends on #35, will rebase once thats merged

vladfrangu commented 3 years ago

CC: @pocesar @B4nan @mnmkng

vladfrangu commented 3 years ago

the generics are getting quite complex, it looks good, but we need to ensure if it does what it should once we are done with the code migration (i guess once we have the tests migrated to TS it will be enough)

I know, but sadly they are needed for strict typings.. 😔

However, this might give you some re-assurance (and I've done mini tests like these to make sure it got everything automatically):

image image

Also, I noticed the fact the typeof chromium was erroring, I have fixed that (was an issue on my part)