-
-
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
static text()
method is not actually exported
#2402
Comments
but it's clear to see from the source that only |
Looks like this is a document bug; see #2286 for what it apparently actually should be. Also for |
@brettz9 no he's using the object methods, not the static ones, that pull request should definitely not go through. He's breaking the readme, not fixing the issue https://github.com/cheeriojs/cheerio/pull/2286/files He's changed the static call |
Ok, but the big problem now is that the static functions aren't exported and that PR is the only issue I see doing anything to draw attention to what a user can do. That doesn't make it right, but it does point to the need to get the main issue resolved. |
I'm happy to accept a PR that adds the missing exports. Agreed they should be there. |
As mentioned in the README:
Yet neither
index.d.ts
norindex.js
actually forwardstext
fromlib/static.{d.ts,js}
(it appears to re-export methods one-by-one for some reason, and missestext
).As a workaround I tried importing static directly, but it doesnt like it.
Using
import {text} from 'cheerio/lib/static'
gets past typescript complaints, but for some reason doesn't transpile to mjs well.So [at least in typescript targeting ES2020 using modules] it's impossible to use the text static method.
The text was updated successfully, but these errors were encountered: