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
After upgrading from rc to 1.0.0, cheerio.Element is no longer valid. Now need to manually install domhandler and then import Element from domhandler
Example
Here's an example where the issue becomes apparent:
import*ascheeriofrom'cheerio'const$=cheerio.load('<ul><li>hello</li></ul>')// Type Element is missing the following properties from type Element:// classList, className, clientHeight, clientLeft// , and 157 more.constul: cheerio.Cheerio<Element>=$('ul')test(ul)functiontest(elements: cheerio.Cheerio<Element>){}
It would be beneficial for developers if Cheerio could re-export the commonly used types from domhandler, such as Element. This would streamline the development process by reducing the need for additional imports and clarifying the source of types.
The text was updated successfully, but these errors were encountered:
Description
After upgrading from rc to 1.0.0, cheerio.Element is no longer valid. Now need to manually install
domhandler
and then importElement
from domhandlerExample
Here's an example where the issue becomes apparent:
pnpm i domhandler
It works.
Suggested Solutions
It would be beneficial for developers if Cheerio could re-export the commonly used types from domhandler, such as Element. This would streamline the development process by reducing the need for additional imports and clarifying the source of types.
The text was updated successfully, but these errors were encountered: