@types/dom-parser
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -51,3 +51,3 @@ // Type definitions for dom-parser 0.1 | ||
ELEMENT_NODE = 1, | ||
TEXT_NODE = 3 | ||
TEXT_NODE = 3, | ||
} | ||
@@ -54,0 +54,0 @@ } |
{ | ||
"name": "@types/dom-parser", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "TypeScript definitions for dom-parser", | ||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dom-parser", | ||
"license": "MIT", | ||
@@ -22,4 +23,4 @@ "contributors": [ | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "cc4d64a455224253131616dc2a047c4d87134bc59649c10427ca52fc05ba677f", | ||
"typeScriptVersion": "3.3" | ||
"typesPublisherContentHash": "61682b9fadee26d32ab87e0f8c68c54ca291e3410b4ea757db31611e287d5368", | ||
"typeScriptVersion": "4.5" | ||
} |
@@ -9,5 +9,64 @@ # Installation | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dom-parser. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dom-parser/index.d.ts) | ||
````ts | ||
// Type definitions for dom-parser 0.1 | ||
// Project: https://github.com/ershov-konst/dom-parser#readme | ||
// Definitions by: Guy Bidkar <https://github.com/gbidkar> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
declare class DomParser { | ||
constructor(); | ||
parseFromString(html: string): DomParser.Dom; | ||
} | ||
declare namespace DomParser { | ||
interface Dom extends DOMSearchable { | ||
getElementsByClassName(className: string): Node[] | null; | ||
getElementsByTagName(tagName: string): Node[] | null; | ||
getElementsByName(name: string): Node[] | null; | ||
getElementById(id: string): Node | null; | ||
getElementsByAttribute(attr: string, value: string): Node[] | null; | ||
} | ||
interface Node extends DOMSearchable { | ||
nodeType: NodeType; | ||
nodeName: string; | ||
childNodes: Node[]; | ||
firstChild: Node | null; | ||
lastChild: Node | null; | ||
parentNode: Node | null; | ||
attributes: string[]; | ||
innerHTML: string; | ||
outerHTML: string; | ||
textContent: string; | ||
getElementsByClassName(className: string): Node[] | null; | ||
getElementsByTagName(tagName: string): Node[] | null; | ||
getElementsByName(name: string): Node[] | null; | ||
getElementById(id: string): Node | null; | ||
getAttribute(name: string): string | null; | ||
} | ||
interface DOMSearchable { | ||
getElementsByClassName(className: string): Node[] | null; | ||
getElementsByTagName(tagName: string): Node[] | null; | ||
getElementsByName(name: string): Node[] | null; | ||
getElementById(id: string): Node | null; | ||
} | ||
enum NodeType { | ||
ELEMENT_NODE = 1, | ||
TEXT_NODE = 3, | ||
} | ||
} | ||
export = DomParser; | ||
```` | ||
### Additional Details | ||
* Last updated: Mon, 30 Nov 2020 05:00:28 GMT | ||
* Last updated: Fri, 22 Sep 2023 20:29:40 GMT | ||
* Dependencies: none | ||
@@ -14,0 +73,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
5996
1
76