Skip to content

Commit 2a2c4e0

Browse files
chore: remove TypeScript Version from declaration files
1 parent 1991924 commit 2a2c4e0

7 files changed

Lines changed: 13 additions & 25 deletions

File tree

index.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
// TypeScript Version: 4.7
2-
31
export { default } from './lib/server/html-to-dom';

lib/client/constants.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// TypeScript Version: 4.7
2-
31
/**
42
* SVG elements, unlike HTML elements, are case-sensitive.
53
*

lib/client/domparser.d.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
// TypeScript Version: 4.7
2-
31
/**
42
* Parses HTML string to DOM nodes.
53
*
6-
* @param html - HTML markup.
7-
* @return - NodeList.
4+
* @param html - HTML markup.
5+
* @returns - NodeList.
86
*/
97
export default function domparser(html: string): NodeList;

lib/client/html-to-dom.d.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
// TypeScript Version: 4.7
2-
31
import { DataNode, Element } from 'domhandler';
42

53
/**
64
* Parses HTML string to DOM nodes in browser.
75
*
8-
* @param html - HTML markup.
9-
* @return - DOM elements.
6+
* @param html - HTML markup.
7+
* @returns - DOM elements.
108
*/
119
export default function HTMLDOMParser(html: string): Array<DataNode | Element>;

lib/client/utilities.d.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
// TypeScript Version: 4.7
2-
31
import { Comment, Element, ProcessingInstruction, Text } from 'domhandler';
42

53
/**
64
* Formats DOM attributes to a hash map.
75
*
8-
* @param attributes - List of attributes.
9-
* @return - Map of attribute name to value.
6+
* @param attributes - List of attributes.
7+
* @returns - Map of attribute name to value.
108
*/
119
export function formatAttributes(
1210
attributes: NamedNodeMap

lib/server/html-to-dom.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// TypeScript Version: 4.7
2-
31
import {
42
Comment,
53
DomHandlerOptions,
@@ -12,10 +10,12 @@ import {
1210
* Parses HTML string to DOM nodes in Node.js.
1311
*
1412
* This is the same method as `require('htmlparser2').parseDOM`
15-
* https://github.com/fb55/htmlparser2/blob/v6.0.0/src/index.ts#L29-L41
13+
*
14+
* @see https://github.com/fb55/htmlparser2/blob/v9.0.0/src/index.ts#L34-L46
15+
* @see https://github.com/fb55/domhandler/tree/v5.0.3#readme
1616
*
1717
* @param html - HTML markup.
18-
* @param options - Parser options (https://github.com/fb55/domhandler/tree/v5.0.3#readme).
18+
* @param options - Parser options.
1919
* @returns - DOM nodes.
2020
*/
2121
export default function HTMLDOMParser(

lib/server/utilities.d.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
// TypeScript Version: 4.7
2-
3-
type Nodes = Array<Comment | Element | ProcessingInstruction | Text>;
1+
type Nodes = (Comment | Element | ProcessingInstruction | Text)[];
42

53
/**
64
* Sets root parent to null.
75
*
8-
* @param nodes
9-
* @return
6+
* @param nodes - Nodes.
7+
* @returns - Nodes.
108
*/
119
export function unsetRootParent(nodes: Nodes): Nodes;

0 commit comments

Comments
 (0)