Skip to content

Commit

Permalink
Update typings for getText and setText functions
Browse files Browse the repository at this point in the history
  • Loading branch information
demiazz committed Jun 6, 2017
1 parent aeed269 commit 8457eea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions d.ts/homey.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function delegate(target: EventTarget, selector: CSSSelector, eventType:

export function remove(element: Element): boolean;
export function setHtml(element: Element, html: string): void;
export function setText(element: Element, text: string): void;
export function setText(element: Node, text: string): void;

/* Quering */

Expand All @@ -51,7 +51,7 @@ export function queryAll(element: Element, selector: CSSSelector): Elements;

export function closest(element: Element, condition: CSSSelector | Predicate): Element | null;
export function getHtml(element: Element): string;
export function getText(element: Element): string;
export function getText(element: Node): string;
export function matches(element: Element, selector: CSSSelector): boolean;
export function parent(element: Element): Element | null;
export function parentBy(element: Element, condition: CSSSelector | Predicate): Element | null;
Expand Down
2 changes: 1 addition & 1 deletion src/manipulation/set-text.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* @flow */

function setText(element: Element, text: string): void {
function setText(element: Node, text: string): void {
element.textContent = text;
}

Expand Down
2 changes: 1 addition & 1 deletion src/traversing/get-text.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* @flow */

function getText(element: Element): string {
function getText(element: Node): string {
return element.textContent;
}

Expand Down

0 comments on commit 8457eea

Please sign in to comment.