From 71de14000c28be1cd5a5cf41c145c9690258a472 Mon Sep 17 00:00:00 2001 From: Anderson Lima Date: Sun, 12 Nov 2023 00:20:08 -0300 Subject: [PATCH] update typing --- src/common/types.d.ts | 15 ++++++++++++++- src/common/types.js | 8 +++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/common/types.d.ts b/src/common/types.d.ts index 98e52e7..949eb8d 100644 --- a/src/common/types.d.ts +++ b/src/common/types.d.ts @@ -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; } diff --git a/src/common/types.js b/src/common/types.js index f979aeb..90ebbe0 100644 --- a/src/common/types.js +++ b/src/common/types.js @@ -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 */ /**