@types/domhandler
Advanced tools
Comparing version 2.4.5 to 3.1.0
{ | ||
"name": "@types/domhandler", | ||
"version": "2.4.5", | ||
"description": "TypeScript definitions for domhandler", | ||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/domhandler", | ||
"version": "3.1.0", | ||
"description": "Stub TypeScript definitions entry for domhandler, which provides its own types definitions", | ||
"main": "", | ||
"scripts": {}, | ||
"license": "MIT", | ||
"contributors": [ | ||
{ | ||
"name": "Johan Davidsson", | ||
"githubUsername": "johandavidson", | ||
"url": "https://github.com/johandavidson" | ||
} | ||
], | ||
"main": "", | ||
"types": "index.d.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", | ||
"directory": "types/domhandler" | ||
"dependencies": { | ||
"domhandler": "*" | ||
}, | ||
"scripts": {}, | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "60a0dea4ceaa8d3a2845f5b3a5f65cca135472055a4143248af267f9fd234f68", | ||
"typeScriptVersion": "4.5" | ||
"deprecated": "This is a stub types definition. domhandler provides its own type definitions, so you do not need this installed." | ||
} |
@@ -1,92 +0,3 @@ | ||
# Installation | ||
> `npm install --save @types/domhandler` | ||
This is a stub types definition for @types/domhandler (https://github.com/fb55/domhandler#readme). | ||
# Summary | ||
This package contains type definitions for domhandler (https://github.com/fb55/DomHandler#readme). | ||
# Details | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/domhandler. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/domhandler/index.d.ts) | ||
````ts | ||
export interface DomHandlerOptions { | ||
/*** | ||
* Indicates whether the whitespace in text nodes should be normalized | ||
* (= all whitespace should be replaced with single spaces). The default value is "false". | ||
*/ | ||
normalizeWhitespace?: boolean | undefined; | ||
/*** | ||
* Adds DOM level 1 properties to all elements. | ||
*/ | ||
withDomLvl1?: boolean | undefined; | ||
/*** | ||
* Indicates whether a startIndex property will be added to nodes. | ||
* When the parser is used in a non-streaming fashion, startIndex is an integer | ||
* indicating the position of the start of the node in the document. | ||
* The default value is "false". | ||
*/ | ||
withStartIndices?: boolean | undefined; | ||
/*** | ||
* Indicates whether a endIndex property will be added to nodes. | ||
* When the parser is used in a non-streaming fashion, endIndex is an integer | ||
* indicating the position of the end of the node in the document. | ||
* The default value is "false". | ||
*/ | ||
withEndIndices?: boolean | undefined; | ||
} | ||
export interface DomElement { | ||
attribs?: { [s: string]: string } | undefined; | ||
children?: DomElement[] | undefined; | ||
data?: any; | ||
name?: string | undefined; | ||
next?: DomElement | undefined; | ||
parent?: DomElement | undefined; | ||
prev?: DomElement | undefined; | ||
type?: string | undefined; | ||
} | ||
export interface Element extends DomElement { | ||
name: string; | ||
} | ||
export interface Node extends DomElement { | ||
readonly firstChild: DomElement; | ||
readonly lastChild: DomElement; | ||
readonly nodeType: number; | ||
} | ||
export class DomHandler { | ||
constructor(callback: (error: any, dom: DomElement[]) => any, options?: DomHandlerOptions); | ||
onparserinit(parser: any): void; | ||
/*** | ||
* Resets the handler back to starting state | ||
*/ | ||
onreset(): void; | ||
/*** | ||
* Signals the handler that parsing is done | ||
*/ | ||
onend(): void; | ||
onerror(error: Error): void; | ||
onclosetag(): void; | ||
onopentag(name: string, attribs: { [s: string]: string }): void; | ||
ontext(data: string): void; | ||
oncomment(data: string): void; | ||
oncdatastart(): void; | ||
oncommentend(): void; | ||
onprocessinginstruction(name: string, data: string): void; | ||
} | ||
```` | ||
### Additional Details | ||
* Last updated: Mon, 06 Nov 2023 22:41:05 GMT | ||
* Dependencies: none | ||
# Credits | ||
These definitions were written by [Johan Davidsson](https://github.com/johandavidson). | ||
domhandler provides its own type definitions, so you don't need @types/domhandler installed! |
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
1752
1
3
0
2
1
1
3
1
1
+ Addeddomhandler@*
+ Addeddomelementtype@2.3.0(transitive)
+ Addeddomhandler@5.0.3(transitive)