Skip to content

Commit 1c31dfe

Browse files
hexpunkfb55
andauthored
fix(types): re-export types from domhandler (#4353)
* [#4256] Re-export types from domhandler * add `excludeExternals` --------- Co-authored-by: Felix <[email protected]>
1 parent 703cfca commit 1c31dfe

File tree

5 files changed

+18
-1
lines changed

5 files changed

+18
-1
lines changed

src/index-browser.mts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
export type * from './types.js';
22
export type {
3+
AnyNode,
34
Cheerio,
45
CheerioAPI,
56
CheerioOptions,
7+
Document,
8+
Element,
69
HTMLParser2Options,
10+
ParentNode,
711
} from './slim.js';
812
export { contains, merge } from './static.js';
913

src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ export * from './load-parse.js';
77
export { contains, merge } from './static.js';
88
export type * from './types.js';
99
export type {
10+
AnyNode,
1011
Cheerio,
1112
CheerioAPI,
1213
CheerioOptions,
14+
Document,
15+
Element,
1316
HTMLParser2Options,
17+
ParentNode,
1418
} from './slim.js';
1519

1620
import { adapter as htmlparser2Adapter } from 'parse5-htmlparser2-tree-adapter';

src/load.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import type { AnyNode, Document, Element, ParentNode } from 'domhandler';
1010
import type { SelectorType, BasicAcceptedElems } from './types.js';
1111
import { ElementType } from 'htmlparser2';
1212

13+
export type { AnyNode, Document, Element, ParentNode } from 'domhandler';
14+
1315
type StaticType = typeof staticMethods;
1416

1517
/**

src/slim.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ export { contains, merge } from './static.js';
1313
export type * from './types.js';
1414
export type { Cheerio } from './cheerio.js';
1515
export type { CheerioOptions, HTMLParser2Options } from './options.js';
16-
export type { CheerioAPI } from './load.js';
16+
export type {
17+
AnyNode,
18+
CheerioAPI,
19+
Document,
20+
Element,
21+
ParentNode,
22+
} from './load.js';
1723

1824
/**
1925
* Create a querying function, bound to a document created from the provided

website/typedoc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"tsconfig": "../tsconfig.typedoc.json",
55
"readme": "none",
66
"excludePrivate": true,
7+
"excludeExternals": true,
78
"plugin": ["typedoc-plugin-markdown", "typedoc-plugin-mdn-links"],
89
"out": "src/content/docs/api",
910
"entryFileName": "index",

0 commit comments

Comments
 (0)