-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
As mentioned in the README:
You may also render the text content of a Cheerio object using the text static method:
const $ = cheerio.load('This is <em>content</em>.');
cheerio.text($('body'));
//=> This is content.Yet neither index.d.ts nor index.js actually forwards text from lib/static.{d.ts,js} (it appears to re-export methods one-by-one for some reason, and misses text).
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels


