Skip to content

Commit

Permalink
update typing
Browse files Browse the repository at this point in the history
  • Loading branch information
pyanderson committed Nov 12, 2023
1 parent 6e06bfe commit 71de140
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
15 changes: 14 additions & 1 deletion src/common/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
interface EnhancedHTMLElement extends HTMLElement {
name: string;
getElement: (selectors: string) => EnhancedHTMLElement | null;
getAllElements: (selectors: string) => EnhancedHTMLElement[];
select: (
strings: string[],
...values: string[]
) => EnhancedHTMLElement | null;
getValue: (selectors: string) => string | undefined;
setValue: (selectors: string, value: string | number) => void;
getInt: (selectors: string) => number;
addEventObserver: (
eventName: string,
eventHandler: (e: Event) => void,
selector: string,
) => void;
}
8 changes: 7 additions & 1 deletion src/common/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,13 @@
/**
* @class EnhancedHTMLElement
* @extends HTMLElement
* @property {String} name - Eg.: Anão
* @property {Function} getElement
* @property {Function} getAllElements
* @property {Function} select
* @property {Function} getValue
* @property {Function} setValue
* @property {Function} getInt
* @property {Function} addEventObserver
*/

/**
Expand Down

0 comments on commit 71de140

Please sign in to comment.