
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
@types/html-parser
Advanced tools
TypeScript definitions for html-parser
npm install --save @types/html-parser
This package contains type definitions for html-parser (https://www.npmjs.com/package/html-parser).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/html-parser.
export type Callback = (arg: any) => any;
export type Token = ">" | "/>" | "?>";
export interface CallbacksOption {
attribute?(name: string, value: any): void;
openElement?(tagName: string): void;
closeOpenedElement?(tagName: string, token: Token, isUnary: boolean): void;
closeElement?(name: string): void;
comment?(content: string): void;
docType?(content: string): void;
cdata?(content: string): void;
xmlProlog?(): void;
text?(value: string): void;
}
export interface RegExpOptions {
name?: RegExp | undefined;
attribute?: RegExp | undefined;
}
export interface RemovalCallback {
attributes?: Callback | string[];
elements?: Callback | string[];
comments?: Callback | boolean;
docTypes?: Callback | boolean;
}
export function parse(htmlString: string, callbacks?: CallbacksOption, regex?: RegExpOptions): void;
export function parseFile(
fileName: string,
encoding: string | undefined,
callbacks: CallbacksOption,
callback: Callback,
): void;
export function sanitize(htmlString: string, removalCallbacks?: RemovalCallback): string;
These definitions were written by Vladimir Grenaderov https://github.com/VladimirGrenaderov, // Max Boguslavskiy.
FAQs
TypeScript definitions for html-parser
The npm package @types/html-parser receives a total of 3,464 weekly downloads. As such, @types/html-parser popularity was classified as popular.
We found that @types/html-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.