Skip to content

Commit

Permalink
docs(types): Consistently use JSDoc in comments for Adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
fb55 committed Sep 23, 2020
1 parent 4185204 commit b0eeefd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ interface Adapter<Node, ElementNode extends Node> {
*/
getParent: (node: ElementNode) => ElementNode | null;

/*
*Get the siblings of the node. Note that unlike jQuery's `siblings` method,
*this is expected to include the current node as well
/**
* Get the siblings of the node. Note that unlike jQuery's `siblings` method,
* this is expected to include the current node as well
*/
getSiblings: (node: Node) => Node[];

/*
/**
* Get the text content of the node, and its children if it has any.
*/
getText: (node: Node) => string;
Expand Down
9 changes: 4 additions & 5 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ export interface Adapter<Node, ElementNode extends Node> {
*/
getParent: (node: ElementNode) => ElementNode | null;

/*
*Get the siblings of the node. Note that unlike jQuery's `siblings` method,
*this is expected to include the current node as well
/**
* Get the siblings of the node. Note that unlike jQuery's `siblings` method,
* this is expected to include the current node as well
*/
getSiblings: (node: Node) => Node[];

/*
/**
* Get the text content of the node, and its children if it has any.
*/
getText: (node: Node) => string;
Expand Down Expand Up @@ -95,7 +95,6 @@ export interface Adapter<Node, ElementNode extends Node> {
isActive?: (elem: ElementNode) => boolean;
}

// TODO default types to the domutils/htmlparser2 types
export interface Options<Node, ElementNode extends Node> {
/**
* When enabled, tag names will be case-sensitive. Default: false.
Expand Down

0 comments on commit b0eeefd

Please sign in to comment.