@xmldom/xmldom 0.7.1 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 0.7.2
8
+
9
+ [Commits](https://github.com/xmldom/xmldom/compare/0.7.1...0.7.2)
10
+
11
+ ### Fixes:
12
+
13
+ - Types: Add index.d.ts to packaged files [`#288`](https://github.com/xmldom/xmldom/pull/288)
14
+ Thank you [@forty](https://github.com/forty)
15
+
7
16
  ## 0.7.1
8
17
 
9
18
  [Commits](https://github.com/xmldom/xmldom/compare/0.7.0...0.7.1)
package/index.d.ts ADDED
@@ -0,0 +1,43 @@
1
+ /// <reference lib="dom" />
2
+
3
+ declare module "@xmldom/xmldom" {
4
+ var DOMParser: DOMParserStatic;
5
+ var XMLSerializer: XMLSerializerStatic;
6
+ var DOMImplementation: DOMImplementationStatic;
7
+
8
+ interface DOMImplementationStatic {
9
+ new(): DOMImplementation;
10
+ }
11
+
12
+ interface DOMParserStatic {
13
+ new (): DOMParser;
14
+ new (options: Options): DOMParser;
15
+ }
16
+
17
+ interface XMLSerializerStatic {
18
+ new (): XMLSerializer;
19
+ }
20
+
21
+ interface DOMParser {
22
+ parseFromString(xmlsource: string, mimeType?: string): Document;
23
+ }
24
+
25
+ interface XMLSerializer {
26
+ serializeToString(node: Node): string;
27
+ }
28
+
29
+ interface Options {
30
+ locator?: any;
31
+ errorHandler?: ErrorHandlerFunction | ErrorHandlerObject | undefined;
32
+ }
33
+
34
+ interface ErrorHandlerFunction {
35
+ (level: string, msg: any): any;
36
+ }
37
+
38
+ interface ErrorHandlerObject {
39
+ warning?: ((msg: any) => any) | undefined;
40
+ error?: ((msg: any) => any) | undefined;
41
+ fatalError?: ((msg: any) => any) | undefined;
42
+ }
43
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xmldom/xmldom",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "A pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module.",
5
5
  "keywords": [
6
6
  "w3c",
@@ -23,6 +23,7 @@
23
23
  "CHANGELOG.md",
24
24
  "LICENSE",
25
25
  "readme.md",
26
+ "index.d.ts",
26
27
  "lib"
27
28
  ],
28
29
  "scripts": {