Skip to content

Commit

Permalink
chore: fix text
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightning00Blade committed Apr 24, 2024
1 parent bb1390f commit a4bfbec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions docs/api/puppeteer.page.__eval.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ The compiler should be able to infer the return type from the `pageFunction` you
## Example 3

```ts
// The compiler can infer the return type in this case, but if it can't
// or if you want to be more explicit, provide it as the generic type.
const allInputValues = await page.$$eval<string[]>('input', elements =>
const allInputValues = await page.$$eval('input', elements =>
elements.map(e => e.textContent)
);
```
4 changes: 1 addition & 3 deletions packages/puppeteer-core/src/api/Page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1244,9 +1244,7 @@ export abstract class Page extends EventEmitter<PageEvents> {
* @example
*
* ```ts
* // The compiler can infer the return type in this case, but if it can't
* // or if you want to be more explicit, provide it as the generic type.
* const allInputValues = await page.$$eval<string[]>('input', elements =>
* const allInputValues = await page.$$eval('input', elements =>
* elements.map(e => e.textContent)
* );
* ```
Expand Down

0 comments on commit a4bfbec

Please sign in to comment.