Skip to content

Commit

Permalink
[#4256] Re-export types from domhandler
Browse files Browse the repository at this point in the history
  • Loading branch information
hexpunk committed Jan 12, 2025
1 parent 80aadb0 commit 466aeda
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/index-browser.mts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
export type * from './types.js';
export type {
AnyNode,
Cheerio,
CheerioAPI,
CheerioOptions,
Document,
Element,
HTMLParser2Options,
ParentNode,
} from './slim.js';
export { contains, merge } from './static.js';

Expand Down
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ export * from './load-parse.js';
export { contains, merge } from './static.js';
export type * from './types.js';
export type {
AnyNode,
Cheerio,
CheerioAPI,
CheerioOptions,
Document,
Element,
HTMLParser2Options,
ParentNode,
} from './slim.js';

import { adapter as htmlparser2Adapter } from 'parse5-htmlparser2-tree-adapter';
Expand Down
2 changes: 2 additions & 0 deletions src/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import type { AnyNode, Document, Element, ParentNode } from 'domhandler';
import type { SelectorType, BasicAcceptedElems } from './types.js';
import { ElementType } from 'htmlparser2';

export type { AnyNode, Document, Element, ParentNode } from 'domhandler';

type StaticType = typeof staticMethods;

/**
Expand Down
8 changes: 7 additions & 1 deletion src/slim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ export { contains, merge } from './static.js';
export type * from './types.js';
export type { Cheerio } from './cheerio.js';
export type { CheerioOptions, HTMLParser2Options } from './options.js';
export type { CheerioAPI } from './load.js';
export type {
AnyNode,
CheerioAPI,
Document,
Element,
ParentNode,
} from './load.js';

/**
* Create a querying function, bound to a document created from the provided
Expand Down

0 comments on commit 466aeda

Please sign in to comment.