@types/domhandler
Advanced tools
Comparing version 2.4.1 to 2.4.2
@@ -11,3 +11,3 @@ // Type definitions for domhandler 2.4 | ||
*/ | ||
normalizeWhitespace?: boolean; | ||
normalizeWhitespace?: boolean | undefined; | ||
@@ -17,3 +17,3 @@ /*** | ||
*/ | ||
withDomLvl1?: boolean; | ||
withDomLvl1?: boolean | undefined; | ||
@@ -26,3 +26,3 @@ /*** | ||
*/ | ||
withStartIndices?: boolean; | ||
withStartIndices?: boolean | undefined; | ||
@@ -35,14 +35,14 @@ /*** | ||
*/ | ||
withEndIndices?: boolean; | ||
withEndIndices?: boolean | undefined; | ||
} | ||
export interface DomElement { | ||
attribs?: {[s: string]: string}; | ||
children?: DomElement[]; | ||
attribs?: {[s: string]: string} | undefined; | ||
children?: DomElement[] | undefined; | ||
data?: any; | ||
name?: string; | ||
next?: DomElement; | ||
parent?: DomElement; | ||
prev?: DomElement; | ||
type?: string; | ||
name?: string | undefined; | ||
next?: DomElement | undefined; | ||
parent?: DomElement | undefined; | ||
prev?: DomElement | undefined; | ||
type?: string | undefined; | ||
} | ||
@@ -49,0 +49,0 @@ |
{ | ||
"name": "@types/domhandler", | ||
"version": "2.4.1", | ||
"version": "2.4.2", | ||
"description": "TypeScript definitions for domhandler", | ||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/domhandler", | ||
"license": "MIT", | ||
@@ -14,3 +15,3 @@ "contributors": [ | ||
"main": "", | ||
"types": "index", | ||
"types": "index.d.ts", | ||
"repository": { | ||
@@ -23,4 +24,4 @@ "type": "git", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "07ac4daee8e2e8ab16b4902fe5628aad6353d27afa6d3153bd7b94bcf7dfc2d4", | ||
"typeScriptVersion": "2.0" | ||
"typesPublisherContentHash": "125509c324cf021fa0e211cfd1780659639facf466fa40143b2884f50b8eac53", | ||
"typeScriptVersion": "3.6" | ||
} |
@@ -5,9 +5,91 @@ # Installation | ||
# Summary | ||
This package contains type definitions for domhandler ( https://github.com/fb55/DomHandler#readme ). | ||
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 | ||
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 | ||
// Type definitions for domhandler 2.4 | ||
// Project: https://github.com/fb55/DomHandler#readme | ||
// Definitions by: Johan Davidsson <https://github.com/johandavidson> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
Additional Details | ||
* Last updated: Mon, 25 Mar 2019 16:42:33 GMT | ||
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: Tue, 06 Jul 2021 20:32:46 GMT | ||
* Dependencies: none | ||
@@ -17,2 +99,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Johan Davidsson <https://github.com/johandavidson>. | ||
These definitions were written by [Johan Davidsson](https://github.com/johandavidson). |
Sorry, the diff of this file is not supported yet
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
7442
0
99