-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
The Cheerio interface is not exported in the type definitions #1540
Comments
Feel free to open a PR to add this! |
Looking at your link, it seems like the issue is that we export a value type. If all that's needed is a |
Consider this code when using function getTrimmedText(el: cheerio.Cheerio): string {
return el.text().trim()
}
const $ = cheerio.load(html)
const trimmedText = getTrimmedText($('#text')) How can I type an argument for a function I think this issue should be reopened. |
After further investigation I think declaring |
See https://github.com/cheeriojs/cheerio/blob/v1.0.0/types/index.d.ts
The interface Cheerio is declared but not exported. It leads to TS compilation errors in projects, that need it. E.G. vuejs/vue-test-utils#1737
The text was updated successfully, but these errors were encountered: