Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
chore: remove src/TaskQueue (#5826)
* chore: Remove src/TaskQueue The only place it's used is in `src/Page.ts` to have a chain of screenshot promises. Rather than initialize a task queue in `Browser` and pass it through a chain of constructors we instead move the class into `src/Page` and define it inline. In the future we might want to create a helpers folder to contain small utilities like that (`src/Page.ts` is already far too large) but I'm leaving that for a future PR. `TaskQueue` isn't documented in `api.md` so I don't think this is a breaking change. I updated the type of `screenshot()` to return `Promise<string | Buffer | void>` because if a promise rejects it's silently swallowed. I'd like to change this behaviour but one step at a time. This type only had to change as now we type the screenshot task queue correctly rather than using `any` which then exposed the incorrect `screenshot()` types.
- Loading branch information
1 parent
4fdb1e3
commit 49ce659
Showing
5 changed files
with
30 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.