@tb-dev/prototype-dom 7.0.2 → 7.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +51 -0
  2. package/package.json +6 -6
package/dist/index.d.ts CHANGED
@@ -1,3 +1,54 @@
1
+ export declare const element: {
2
+ getAttributeStrict: typeof getAttributeStrict;
3
+ getAttributeAsFloatStrict: typeof getAttributeAsFloatStrict;
4
+ getAttributeAsIntStrict: typeof getAttributeAsIntStrict;
5
+ getTextStrict: typeof getTextStrict;
6
+ getTextAsIntStrict: typeof getTextAsIntStrict;
7
+ getTextAsFloatStrict: typeof getTextAsFloatStrict;
8
+ queryStrict: typeof queryStrict;
9
+ queryAsArray: typeof queryAsArray;
10
+ queryAsSet: typeof queryAsSet;
11
+ queryAsMap: typeof queryAsMap;
12
+ waitChild: typeof waitChild;
13
+ waitScroll: typeof waitScroll;
14
+ };
15
+
16
+ declare function getAsInteger(): (this: URLSearchParams, name: string, radix?: number) => number | null;
17
+
18
+ declare function getAsIntegerStrict(): (this: URLSearchParams, name: string, radix?: number) => number;
19
+
20
+ declare function getAttributeAsFloatStrict<E extends Element>(): (this: E, attribute: string) => number;
21
+
22
+ declare function getAttributeAsIntStrict<E extends Element>(): (this: E, attribute: string, radix?: number) => number;
23
+
24
+ declare function getAttributeStrict<E extends Element>(): (this: E, attribute: string) => string;
25
+
26
+ declare function getStrict(): (this: URLSearchParams, name: string) => string;
27
+
28
+ declare function getTextAsFloatStrict<E extends Element>(): (this: E) => number;
29
+
30
+ declare function getTextAsIntStrict<E extends Element>(): (this: E, radix?: number) => number;
31
+
32
+ declare function getTextStrict<E extends Element>(): (this: E) => string;
33
+
34
+ declare function queryAsArray<E extends Document | Element>(): <T = Element>(this: E, selector: string, valueFn?: (element: Element) => T) => T[];
35
+
36
+ declare function queryAsMap<E extends Document | Element>(): <T extends Element, K, V = T>(this: E, selector: string, keyFn: (element: T) => K, valueFn?: (element: T) => V) => Map<K, V>;
37
+
38
+ declare function queryAsSet<E extends Document | Element>(): <T = Element>(this: E, selector: string, valueFn?: (element: Element) => T) => Set<T>;
39
+
40
+ declare function queryStrict<E extends Document | Element>(): <T extends Element = Element>(this: E, selector: string) => T;
41
+
42
+ export declare const urlSearchParams: {
43
+ getStrict: typeof getStrict;
44
+ getAsInteger: typeof getAsInteger;
45
+ getAsIntegerStrict: typeof getAsIntegerStrict;
46
+ };
47
+
48
+ declare function waitChild<E extends Document | Element>(): <T extends Element = Element>(this: E, selector: string, timeoutMillis?: number) => Promise<T>;
49
+
50
+ declare function waitScroll<E extends Document | Element>(): (this: E, selector: string, options?: WaitScrollOptions) => Promise<void>;
51
+
1
52
  export declare interface WaitScrollOptions extends ScrollIntoViewOptions {
2
53
  timeout?: number;
3
54
  /** @default true */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tb-dev/prototype-dom",
3
- "version": "7.0.2",
4
- "description": "Prototype methods for DOM objects",
3
+ "version": "7.0.3",
4
+ "description": "Helpful prototype methods",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "author": {
@@ -19,12 +19,12 @@
19
19
  "email": "andrew.shien2@gmail.com"
20
20
  },
21
21
  "devDependencies": {
22
- "@tb-dev/eslint-config": "^5.4.22",
23
- "eslint": "^9.16.0",
22
+ "@tb-dev/eslint-config": "^5.6.0",
23
+ "eslint": "^9.17.0",
24
24
  "prettier": "^3.4.2",
25
25
  "tslib": "^2.8.1",
26
- "typedoc": "^0.27.3",
27
- "typedoc-plugin-mdn-links": "^4.0.3",
26
+ "typedoc": "^0.27.5",
27
+ "typedoc-plugin-mdn-links": "^4.0.5",
28
28
  "typescript": "^5.7.2",
29
29
  "vite": "^6.0.3",
30
30
  "vite-plugin-dts": "^4.3.0"