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
Copy file name to clipboardExpand all lines: Readme.md
+10
Original file line number
Diff line number
Diff line change
@@ -246,6 +246,16 @@ $.prototype.logHtml = function () {
246
246
$('body').logHtml(); // logs "Hello, <b>world</b>!" to the console
247
247
```
248
248
249
+
If you're using TypeScript, you should also add a type definition for your new method:
250
+
251
+
```ts
252
+
declaremodule'cheerio' {
253
+
interfaceCheerio<T> {
254
+
logHtml(this:Cheerio<T>):void;
255
+
}
256
+
}
257
+
```
258
+
249
259
### The "DOM Node" object
250
260
251
261
Cheerio collections are made up of objects that bear some resemblance to [browser-based DOM nodes](https://developer.mozilla.org/en-US/docs/Web/API/Node). You can expect them to define the following properties:
0 commit comments