Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get can return undefined #2364

Closed
glen-84 opened this issue Feb 17, 2022 · 1 comment · Fixed by #2392
Closed

get can return undefined #2364

glen-84 opened this issue Feb 17, 2022 · 1 comment · Fixed by #2392

Comments

@glen-84
Copy link
Contributor

glen-84 commented Feb 17, 2022

https://api.jquery.com/get/

If the value of index is out of bounds — less than the negative number of elements or equal to or greater than the number of elements — it returns undefined.

export function get<T>(this: Cheerio<T>, i: number): T;

This should be : T | undefined;.

@fb55
Copy link
Member

fb55 commented Feb 24, 2022

Happy to accept a PR with a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants