@tb-dev/prototype-dom 7.0.7 → 7.0.9
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.
- package/dist/element.d.ts +28 -0
- package/dist/index.d.ts +5 -60
- package/dist/types.d.ts +5 -0
- package/dist/url.d.ts +9 -0
- package/package.json +9 -9
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { WaitScrollOptions } from './types';
|
|
2
|
+
declare function getAttributeStrict<E extends Element>(): (this: E, attribute: string) => string;
|
|
3
|
+
declare function getAttributeAsFloatStrict<E extends Element>(): (this: E, attribute: string) => number;
|
|
4
|
+
declare function getAttributeAsIntStrict<E extends Element>(): (this: E, attribute: string, radix?: number) => number;
|
|
5
|
+
declare function getTextStrict<E extends Element>(): (this: E) => string;
|
|
6
|
+
declare function getTextAsIntStrict<E extends Element>(): (this: E, radix?: number) => number;
|
|
7
|
+
declare function getTextAsFloatStrict<E extends Element>(): (this: E) => number;
|
|
8
|
+
declare function queryStrict<E extends Document | Element>(): <T extends Element = Element>(this: E, selector: string) => T;
|
|
9
|
+
declare function queryAsArray<E extends Document | Element>(): <T = Element>(this: E, selector: string, valueFn?: (element: Element) => T) => T[];
|
|
10
|
+
declare function queryAsSet<E extends Document | Element>(): <T = Element>(this: E, selector: string, valueFn?: (element: Element) => T) => Set<T>;
|
|
11
|
+
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>;
|
|
12
|
+
declare function waitChild<E extends Document | Element>(): <T extends Element = Element>(this: E, selector: string, timeoutMillis?: number) => Promise<T>;
|
|
13
|
+
declare function waitScroll<E extends Document | Element>(): (this: E, selector: string, options?: WaitScrollOptions) => Promise<void>;
|
|
14
|
+
export declare const element: {
|
|
15
|
+
getAttributeStrict: typeof getAttributeStrict;
|
|
16
|
+
getAttributeAsFloatStrict: typeof getAttributeAsFloatStrict;
|
|
17
|
+
getAttributeAsIntStrict: typeof getAttributeAsIntStrict;
|
|
18
|
+
getTextStrict: typeof getTextStrict;
|
|
19
|
+
getTextAsIntStrict: typeof getTextAsIntStrict;
|
|
20
|
+
getTextAsFloatStrict: typeof getTextAsFloatStrict;
|
|
21
|
+
queryStrict: typeof queryStrict;
|
|
22
|
+
queryAsArray: typeof queryAsArray;
|
|
23
|
+
queryAsSet: typeof queryAsSet;
|
|
24
|
+
queryAsMap: typeof queryAsMap;
|
|
25
|
+
waitChild: typeof waitChild;
|
|
26
|
+
waitScroll: typeof waitScroll;
|
|
27
|
+
};
|
|
28
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,63 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
52
|
-
export declare interface WaitScrollOptions extends ScrollIntoViewOptions {
|
|
53
|
-
timeout?: number;
|
|
54
|
-
/** @default true */
|
|
55
|
-
throwOnTimeout?: boolean;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export { }
|
|
59
|
-
|
|
60
|
-
|
|
1
|
+
import { element } from './element';
|
|
2
|
+
import { urlSearchParams } from './url';
|
|
3
|
+
import { WaitScrollOptions } from './types';
|
|
4
|
+
export type * from './types';
|
|
61
5
|
declare global {
|
|
62
6
|
interface Document {
|
|
63
7
|
/**
|
|
@@ -231,3 +175,4 @@ declare global {
|
|
|
231
175
|
getAsIntegerStrict: (name: string, radix?: number) => number;
|
|
232
176
|
}
|
|
233
177
|
}
|
|
178
|
+
export type { element, urlSearchParams };
|
package/dist/types.d.ts
ADDED
package/dist/url.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare function getStrict(): (this: URLSearchParams, name: string) => string;
|
|
2
|
+
declare function getAsInteger(): (this: URLSearchParams, name: string, radix?: number) => number | null;
|
|
3
|
+
declare function getAsIntegerStrict(): (this: URLSearchParams, name: string, radix?: number) => number;
|
|
4
|
+
export declare const urlSearchParams: {
|
|
5
|
+
getStrict: typeof getStrict;
|
|
6
|
+
getAsInteger: typeof getAsInteger;
|
|
7
|
+
getAsIntegerStrict: typeof getAsIntegerStrict;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tb-dev/prototype-dom",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.9",
|
|
4
4
|
"description": "Helpful prototype methods",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"email": "andrew.shien2@gmail.com"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@tb-dev/eslint-config": "^6.
|
|
23
|
-
"eslint": "^9.
|
|
24
|
-
"prettier": "^3.5.
|
|
22
|
+
"@tb-dev/eslint-config": "^6.7.1",
|
|
23
|
+
"eslint": "^9.23.0",
|
|
24
|
+
"prettier": "^3.5.3",
|
|
25
25
|
"tslib": "^2.8.1",
|
|
26
|
-
"typedoc": "^0.
|
|
27
|
-
"typedoc-plugin-mdn-links": "^
|
|
28
|
-
"typescript": "^5.
|
|
29
|
-
"vite": "^6.2.
|
|
30
|
-
"vite-plugin-dts": "^4.5.
|
|
26
|
+
"typedoc": "^0.28.1",
|
|
27
|
+
"typedoc-plugin-mdn-links": "^5.0.1",
|
|
28
|
+
"typescript": "^5.8.2",
|
|
29
|
+
"vite": "^6.2.3",
|
|
30
|
+
"vite-plugin-dts": "^4.5.3"
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
|
33
33
|
"dist/**/*"
|