Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Remove type re-exports #3969

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,7 @@ export type { Cheerio } from './cheerio.js';
* @category Cheerio
*/
export * from './types.js';
export type {
CheerioOptions,
HTMLParser2Options,
Parse5Options,
} from './options.js';
/**
* Re-exporting all of the node types.
*
* @category DOM Node
*/
export type { Node, AnyNode, ParentNode, Element, Document } from 'domhandler';
export type { CheerioOptions, HTMLParser2Options } from './options.js';
export type { CheerioAPI } from './load.js';
export { contains, merge } from './static.js';

Expand Down
7 changes: 2 additions & 5 deletions src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,14 @@ export interface HTMLParser2Options
extends DomHandlerOptions,
HTMLParser2ParserOptions {}

/** Options for parse5, the default parser for HTML. */
export interface Parse5Options // eslint-disable-line @typescript-eslint/no-empty-interface
extends Parse5ParserOptions<Htmlparser2TreeAdapterMap> {}

/**
* Options accepted by Cheerio.
*
* Please note that parser-specific options are _only recognized_ if the
* relevant parser is used.
*/
export interface CheerioOptions extends Parse5Options {
export interface CheerioOptions
extends Parse5ParserOptions<Htmlparser2TreeAdapterMap> {
/**
* Recommended way of configuring htmlparser2 when wanting to parse XML.
*
Expand Down
5 changes: 0 additions & 5 deletions src/slim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ export type {
CheerioAPI,
CheerioOptions,
HTMLParser2Options,
Node,
AnyNode,
ParentNode,
Element,
Document,
} from './index.js';

/**
Expand Down
2 changes: 1 addition & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ const config = {
],
[
'docusaurus-plugin-typedoc',

{
// TypeDoc options
entryPoints: ['../src/batteries.ts'],
Expand Down Expand Up @@ -259,6 +258,7 @@ const config = {
sidebar: {
// Always display the API entry last
position: Number.MAX_SAFE_INTEGER,
pretty: true,
},
outputFileStrategy: 'members',
},
Expand Down
Loading