You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An issue that I hit is that I am not able to name the type returned by the cheerio $ function: the return type is Cheerio<Element>, but the Element type comes from the domhandler which is not exported.
A workaround would be to add the domhandler lib as a direct dependency of my project, but this brittle as it relies on manually keeping both the direct dependency on domhandler and the one from cheerio in sync. As domhandler types are exposed in the public API of Cheerio, they should be re-exported to ensure reliable usage.
Element is the most prominent example, but all public types should be reachable from the cheerio package. Other examples are AnyNode, Document, or ParentNode.
The text was updated successfully, but these errors were encountered:
Hello,
I am migrating a project from
[email protected]
using types"@types/cheerio" @0.22.35
to[email protected]
.An issue that I hit is that I am not able to name the type returned by the cheerio
$
function: the return type isCheerio<Element>
, but theElement
type comes from thedomhandler
which is not exported.A workaround would be to add the
domhandler
lib as a direct dependency of my project, but this brittle as it relies on manually keeping both the direct dependency ondomhandler
and the one fromcheerio
in sync. Asdomhandler
types are exposed in the public API of Cheerio, they should be re-exported to ensure reliable usage.Element
is the most prominent example, but all public types should be reachable from thecheerio
package. Other examples areAnyNode
,Document
, orParentNode
.The text was updated successfully, but these errors were encountered: