-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(utilities): update JSDoc and declaration file
- Loading branch information
1 parent
f18c362
commit 048e609
Showing
2 changed files
with
30 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,35 @@ | ||
// TypeScript Version: 3.3 | ||
// TypeScript Version: 4.1 | ||
|
||
import { DomElement } from 'domhandler'; | ||
|
||
/** | ||
* Formats DOM attributes to a hash map. | ||
* | ||
* @param attributes - The list of attributes to format. | ||
* @returns - A map of attribute name to value. | ||
* @param attributes - List of attributes. | ||
* @return - Map of attribute name to value. | ||
*/ | ||
export function formatAttributes(attributes: NamedNodeMap): {[name: string]: string}; | ||
export function formatAttributes( | ||
attributes: NamedNodeMap | ||
): { [name: string]: string }; | ||
|
||
/** | ||
* Formats the browser DOM nodes to mimic the output of `htmlparser2.parseDOM()`. | ||
* | ||
* @param nodes - The DOM nodes to format. | ||
* @param parentObj - The formatted parent node of the given DOM nodes. | ||
* @param directive - The directive. | ||
* @param nodes - DOM nodes. | ||
* @param parentNode - Formatted parent node. | ||
* @param directive - Directive. | ||
* @return - DOM elements. | ||
*/ | ||
export function formatDOM(nodes: NodeList, parentObj?: DomElement, directive?: string): DomElement[]; | ||
export function formatDOM( | ||
nodes: NodeList, | ||
parentNode?: DomElement, | ||
directive?: string | ||
): DomElement[]; | ||
|
||
/** | ||
* Detects IE with or without version. | ||
* Detects if browser is Internet Explorer. | ||
* | ||
* @param version - The IE version to detect. | ||
* @returns - Whether IE or the version has been detected. | ||
* @param version - IE version to detect. | ||
* @return - Whether IE or the version is detected. | ||
*/ | ||
export function isIE(version?: number): boolean; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters