@dereekb/util 13.11.13 → 13.11.15
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/eslint/index.cjs.js +10008 -394
- package/eslint/index.esm.js +9982 -392
- package/eslint/package.json +4 -4
- package/eslint/src/lib/comments.d.ts +14 -3
- package/eslint/src/lib/dbx-tag-families.d.ts +280 -0
- package/eslint/src/lib/index.d.ts +26 -3
- package/eslint/src/lib/jsdoc-parser.d.ts +116 -0
- package/eslint/src/lib/no-inline-string-empty-object-intersection.rule.d.ts +44 -0
- package/eslint/src/lib/no-inline-type-import.rule.d.ts +38 -0
- package/eslint/src/lib/no-sister-re-export.rule.d.ts +69 -0
- package/eslint/src/lib/plugin.d.ts +52 -1
- package/eslint/src/lib/prefer-canonical-jsdoc.rule.d.ts +68 -0
- package/eslint/src/lib/prefer-config-object.rule.d.ts +61 -0
- package/eslint/src/lib/prefer-maybe-type.rule.d.ts +72 -0
- package/eslint/src/lib/prefer-no-side-effects-in-jsdoc.rule.d.ts +1 -1
- package/eslint/src/lib/prefer-suggested-string.rule.d.ts +51 -0
- package/eslint/src/lib/require-constant-naming.rule.d.ts +63 -0
- package/eslint/src/lib/require-dbx-action-companion-tags.rule.d.ts +46 -0
- package/eslint/src/lib/require-dbx-auth-companion-tags.rule.d.ts +45 -0
- package/eslint/src/lib/require-dbx-docs-ui-example-companion-tags.rule.d.ts +42 -0
- package/eslint/src/lib/require-dbx-filter-companion-tags.rule.d.ts +43 -0
- package/eslint/src/lib/require-dbx-form-field-companion-tags.rule.d.ts +46 -0
- package/eslint/src/lib/require-dbx-model-companion-tags.rule.d.ts +46 -0
- package/eslint/src/lib/require-dbx-model-firebase-index-companion-tags.rule.d.ts +44 -0
- package/eslint/src/lib/require-dbx-model-snapshot-field-companion-tags.rule.d.ts +44 -0
- package/eslint/src/lib/require-dbx-pipe-companion-tags.rule.d.ts +43 -0
- package/eslint/src/lib/require-dbx-rule-companion-tags.rule.d.ts +44 -0
- package/eslint/src/lib/require-dbx-util-companion-tags.rule.d.ts +74 -0
- package/eslint/src/lib/require-dbx-web-companion-tags.rule.d.ts +43 -0
- package/eslint/src/lib/require-default-prefix-naming.rule.d.ts +60 -0
- package/eslint/src/lib/require-deprecated-alias-placement.rule.d.ts +75 -0
- package/eslint/src/lib/require-exported-jsdoc-example.rule.d.ts +61 -0
- package/eslint/src/lib/require-no-side-effects.rule.d.ts +1 -1
- package/eslint/src/lib/require-readonly-config-params.rule.d.ts +57 -0
- package/eslint/src/lib/require-single-return.rule.d.ts +42 -0
- package/fetch/index.cjs.js +95 -80
- package/fetch/index.esm.js +95 -80
- package/fetch/package.json +2 -2
- package/fetch/src/lib/error.d.ts +2 -2
- package/fetch/src/lib/fetch.d.ts +15 -15
- package/fetch/src/lib/fetch.file.d.ts +5 -5
- package/fetch/src/lib/fetch.limit.d.ts +2 -2
- package/fetch/src/lib/fetch.page.d.ts +1 -1
- package/fetch/src/lib/fetch.page.iterate.d.ts +4 -4
- package/fetch/src/lib/fetch.type.d.ts +3 -2
- package/fetch/src/lib/fetch.url.d.ts +13 -13
- package/fetch/src/lib/json.d.ts +12 -12
- package/fetch/src/lib/timeout.d.ts +2 -2
- package/fetch/src/lib/url.d.ts +11 -11
- package/index.cjs.js +2592 -2329
- package/index.esm.js +2590 -2327
- package/package.json +1 -1
- package/src/lib/array/array.boolean.d.ts +20 -20
- package/src/lib/array/array.d.ts +73 -72
- package/src/lib/array/array.factory.d.ts +8 -5
- package/src/lib/array/array.filter.d.ts +23 -20
- package/src/lib/array/array.find.d.ts +9 -8
- package/src/lib/array/array.index.d.ts +15 -14
- package/src/lib/array/array.indexed.d.ts +22 -19
- package/src/lib/array/array.make.d.ts +3 -2
- package/src/lib/array/array.map.d.ts +5 -5
- package/src/lib/array/array.number.d.ts +27 -27
- package/src/lib/array/array.random.d.ts +11 -10
- package/src/lib/array/array.set.d.ts +14 -14
- package/src/lib/array/array.string.d.ts +31 -31
- package/src/lib/array/array.unique.d.ts +22 -20
- package/src/lib/array/array.value.d.ts +3 -2
- package/src/lib/assertion/assert.error.d.ts +8 -8
- package/src/lib/assertion/assertion.d.ts +5 -5
- package/src/lib/assertion/assertion.generic.d.ts +3 -3
- package/src/lib/assertion/assertion.number.d.ts +6 -6
- package/src/lib/auth/auth.role.claims.d.ts +12 -11
- package/src/lib/auth/auth.role.d.ts +3 -3
- package/src/lib/auth/pkce.d.ts +2 -2
- package/src/lib/boolean.d.ts +11 -11
- package/src/lib/cache/cache.memoize.d.ts +6 -6
- package/src/lib/contact/domain.d.ts +9 -9
- package/src/lib/contact/email.d.ts +11 -11
- package/src/lib/contact/phone.d.ts +12 -12
- package/src/lib/contact/random.d.ts +11 -9
- package/src/lib/date/date.d.ts +60 -59
- package/src/lib/date/date.time.d.ts +2 -2
- package/src/lib/date/date.unix.d.ts +8 -8
- package/src/lib/date/duration.d.ts +17 -17
- package/src/lib/date/expires.d.ts +29 -27
- package/src/lib/date/hour.d.ts +23 -23
- package/src/lib/date/minute.d.ts +6 -6
- package/src/lib/date/time.d.ts +10 -9
- package/src/lib/date/week.d.ts +32 -31
- package/src/lib/encryption/encryption.object.d.ts +3 -3
- package/src/lib/error/error.d.ts +13 -12
- package/src/lib/error/error.server.d.ts +4 -4
- package/src/lib/file/pdf.d.ts +4 -4
- package/src/lib/filter/filter.d.ts +3 -2
- package/src/lib/function/function.boolean.d.ts +4 -3
- package/src/lib/function/function.forward.d.ts +6 -4
- package/src/lib/getter/getter.d.ts +24 -19
- package/src/lib/getter/getter.map.d.ts +6 -5
- package/src/lib/getter/getter.util.d.ts +3 -2
- package/src/lib/grouping.d.ts +25 -24
- package/src/lib/hash.d.ts +11 -10
- package/src/lib/iterable/iterable.d.ts +39 -39
- package/src/lib/iterable/iterable.map.d.ts +3 -3
- package/src/lib/key.d.ts +16 -16
- package/src/lib/map/map.d.ts +12 -12
- package/src/lib/map/map.intersection.d.ts +3 -3
- package/src/lib/map/map.key.d.ts +16 -14
- package/src/lib/misc/host.d.ts +2 -2
- package/src/lib/model/id.batch.d.ts +4 -3
- package/src/lib/model/id.factory.d.ts +4 -3
- package/src/lib/model/model.conversion.d.ts +19 -14
- package/src/lib/model/model.conversion.field.d.ts +2 -2
- package/src/lib/model/model.copy.d.ts +5 -4
- package/src/lib/model/model.d.ts +48 -46
- package/src/lib/model/model.modify.d.ts +10 -8
- package/src/lib/nodejs/stream.d.ts +6 -5
- package/src/lib/number/bitwise.dencoder.d.ts +12 -12
- package/src/lib/number/bound.d.ts +16 -13
- package/src/lib/number/dollar.d.ts +6 -5
- package/src/lib/number/encoded.d.ts +7 -7
- package/src/lib/number/factory.d.ts +4 -3
- package/src/lib/number/number.d.ts +37 -37
- package/src/lib/number/random.d.ts +11 -10
- package/src/lib/number/round.d.ts +34 -30
- package/src/lib/number/sort.d.ts +3 -2
- package/src/lib/number/transform.d.ts +5 -4
- package/src/lib/object/object.array.d.ts +6 -6
- package/src/lib/object/object.array.delta.d.ts +3 -2
- package/src/lib/object/object.d.ts +12 -12
- package/src/lib/object/object.empty.d.ts +3 -3
- package/src/lib/object/object.equal.d.ts +11 -10
- package/src/lib/object/object.filter.pojo.d.ts +74 -74
- package/src/lib/object/object.filter.tuple.d.ts +26 -26
- package/src/lib/object/object.flatten.d.ts +4 -4
- package/src/lib/object/object.key.d.ts +6 -4
- package/src/lib/object/object.map.d.ts +15 -13
- package/src/lib/page/page.d.ts +5 -5
- package/src/lib/page/page.filter.d.ts +8 -8
- package/src/lib/path/path.d.ts +98 -88
- package/src/lib/promise/callback.d.ts +2 -2
- package/src/lib/promise/is.d.ts +6 -6
- package/src/lib/promise/poll.d.ts +9 -9
- package/src/lib/promise/promise.d.ts +33 -30
- package/src/lib/promise/promise.factory.d.ts +4 -3
- package/src/lib/promise/promise.loop.d.ts +11 -11
- package/src/lib/promise/promise.task.d.ts +6 -5
- package/src/lib/promise/promise.type.d.ts +3 -3
- package/src/lib/promise/use.d.ts +3 -3
- package/src/lib/relation/relation.d.ts +15 -15
- package/src/lib/service/handler.config.d.ts +20 -16
- package/src/lib/service/handler.d.ts +3 -2
- package/src/lib/service/typed.service.d.ts +2 -2
- package/src/lib/set/set.d.ts +62 -59
- package/src/lib/set/set.delta.d.ts +5 -4
- package/src/lib/set/set.hashset.d.ts +5 -5
- package/src/lib/set/set.selection.d.ts +5 -4
- package/src/lib/sort.d.ts +11 -11
- package/src/lib/storage/storage.d.ts +2 -1
- package/src/lib/storage/storage.error.d.ts +4 -4
- package/src/lib/storage/storage.memory.d.ts +7 -7
- package/src/lib/storage/storage.object.d.ts +5 -5
- package/src/lib/string/case.d.ts +6 -6
- package/src/lib/string/char.d.ts +30 -29
- package/src/lib/string/dencoder.d.ts +25 -20
- package/src/lib/string/factory.d.ts +11 -8
- package/src/lib/string/html.d.ts +19 -19
- package/src/lib/string/mimetype.d.ts +9 -8
- package/src/lib/string/prefix.d.ts +8 -8
- package/src/lib/string/replace.d.ts +45 -39
- package/src/lib/string/search.d.ts +5 -4
- package/src/lib/string/sort.d.ts +13 -4
- package/src/lib/string/string.d.ts +44 -43
- package/src/lib/string/transform.d.ts +32 -23
- package/src/lib/string/tree.d.ts +5 -4
- package/src/lib/string/url.d.ts +5 -4
- package/src/lib/tree/tree.array.d.ts +5 -4
- package/src/lib/tree/tree.expand.d.ts +6 -6
- package/src/lib/tree/tree.explore.d.ts +13 -10
- package/src/lib/tree/tree.flatten.d.ts +10 -10
- package/src/lib/type.d.ts +42 -12
- package/src/lib/value/address.d.ts +7 -7
- package/src/lib/value/bound.d.ts +70 -66
- package/src/lib/value/build.d.ts +6 -6
- package/src/lib/value/comparator.d.ts +19 -17
- package/src/lib/value/cron.d.ts +2 -2
- package/src/lib/value/decision.d.ts +6 -5
- package/src/lib/value/equal.d.ts +11 -9
- package/src/lib/value/indexed.d.ts +101 -85
- package/src/lib/value/label.d.ts +2 -2
- package/src/lib/value/map.d.ts +20 -16
- package/src/lib/value/maybe.d.ts +36 -36
- package/src/lib/value/modifier.d.ts +24 -23
- package/src/lib/value/point.d.ts +85 -77
- package/src/lib/value/url.d.ts +2 -2
- package/src/lib/value/use.d.ts +36 -33
- package/src/lib/value/vector.d.ts +15 -14
- package/test/index.cjs.js +41 -36
- package/test/index.esm.js +41 -36
- package/test/package.json +2 -2
- package/test/src/lib/jest/jest.fail.d.ts +2 -2
- package/test/src/lib/shared/shared.d.ts +20 -20
- package/test/src/lib/shared/shared.fail.d.ts +21 -16
- package/test/src/lib/shared/shared.function.d.ts +4 -4
- package/test/src/lib/shared/shared.wrap.d.ts +10 -10
package/src/lib/value/bound.d.ts
CHANGED
|
@@ -27,31 +27,31 @@ export type LatLngBoundOrPoint = LatLngBound | LatLngPoint;
|
|
|
27
27
|
/**
|
|
28
28
|
* Type guard that checks whether the input is a {@link LatLngBound} by testing for the presence of `sw` and `ne` properties.
|
|
29
29
|
*
|
|
30
|
-
* @param input -
|
|
31
|
-
* @returns `true` if the input has `sw` and `ne` properties, indicating a bound
|
|
30
|
+
* @param input - Value to test.
|
|
31
|
+
* @returns `true` if the input has `sw` and `ne` properties, indicating a bound.
|
|
32
32
|
*/
|
|
33
33
|
export declare function isLatLngBound(input: LatLngBound | unknown): input is LatLngBound;
|
|
34
34
|
/**
|
|
35
35
|
* Creates a deep copy of the bound so that mutations to the copy do not affect the original.
|
|
36
36
|
*
|
|
37
|
-
* @param input -
|
|
38
|
-
* @returns
|
|
37
|
+
* @param input - Bound to copy.
|
|
38
|
+
* @returns A new bound with copied corner points.
|
|
39
39
|
*/
|
|
40
40
|
export declare function copyLatLngBound(input: LatLngBound): LatLngBound;
|
|
41
41
|
/**
|
|
42
42
|
* Checks whether two bounds are identical by comparing both corner points.
|
|
43
43
|
*
|
|
44
|
-
* @param a -
|
|
45
|
-
* @param b -
|
|
46
|
-
* @returns `true` if both the `sw` and `ne` corners are the same
|
|
44
|
+
* @param a - First bound.
|
|
45
|
+
* @param b - Second bound.
|
|
46
|
+
* @returns `true` if both the `sw` and `ne` corners are the same.
|
|
47
47
|
*/
|
|
48
48
|
export declare function isSameLatLngBound(a: LatLngBound, b: LatLngBound): boolean;
|
|
49
49
|
/**
|
|
50
50
|
* Computes the difference between the `ne` and `sw` corner points of a bound, giving the span in latitude and longitude.
|
|
51
51
|
*
|
|
52
|
-
* @param bounds -
|
|
53
|
-
* @param wrap -
|
|
54
|
-
* @returns
|
|
52
|
+
* @param bounds - Bound to measure.
|
|
53
|
+
* @param wrap - Whether to wrap the difference across the antimeridian.
|
|
54
|
+
* @returns A point whose `lat`/`lng` represent the span of the bound.
|
|
55
55
|
*/
|
|
56
56
|
export declare function diffLatLngBoundPoints(bounds: LatLngBound, wrap?: boolean): LatLngPoint;
|
|
57
57
|
/**
|
|
@@ -60,59 +60,59 @@ export declare function diffLatLngBoundPoints(bounds: LatLngBound, wrap?: boolea
|
|
|
60
60
|
* A bound "wraps" when it crosses the antimeridian (longitude +/-180), requiring special handling
|
|
61
61
|
* for containment and overlap checks.
|
|
62
62
|
*
|
|
63
|
-
* @param bound -
|
|
64
|
-
* @returns `true` if the bound wraps the map in either sense
|
|
63
|
+
* @param bound - Bound to check.
|
|
64
|
+
* @returns `true` if the bound wraps the map in either sense.
|
|
65
65
|
*/
|
|
66
66
|
export declare function latLngBoundWrapsMap(bound: LatLngBound): boolean;
|
|
67
67
|
/**
|
|
68
68
|
* Returns true if the input LatLngBound's sw corner comes after the ne corner longitudinally,
|
|
69
69
|
* indicating the bound crosses the antimeridian.
|
|
70
70
|
*
|
|
71
|
-
* @param bound -
|
|
72
|
-
* @returns `true` if the sw longitude is greater than the ne longitude
|
|
71
|
+
* @param bound - Bound to check.
|
|
72
|
+
* @returns `true` if the sw longitude is greater than the ne longitude.
|
|
73
73
|
*/
|
|
74
74
|
export declare function latLngBoundStrictlyWrapsMap(bound: LatLngBound): boolean;
|
|
75
75
|
/**
|
|
76
76
|
* Returns true if the LatLngBound's longitudinal span exceeds the total longitude range (360 degrees),
|
|
77
77
|
* meaning the bound covers the entire map horizontally.
|
|
78
78
|
*
|
|
79
|
-
* @param bound -
|
|
80
|
-
* @returns `true` if the absolute longitude difference exceeds the total longitude range
|
|
79
|
+
* @param bound - Bound to check.
|
|
80
|
+
* @returns `true` if the absolute longitude difference exceeds the total longitude range.
|
|
81
81
|
*/
|
|
82
82
|
export declare function latLngBoundFullyWrapsMap(bound: LatLngBound): boolean;
|
|
83
83
|
/**
|
|
84
84
|
* Returns the north-east corner point of the bound.
|
|
85
85
|
*
|
|
86
|
-
* @param bound -
|
|
87
|
-
* @returns
|
|
86
|
+
* @param bound - Bound to read.
|
|
87
|
+
* @returns The `ne` corner point.
|
|
88
88
|
*/
|
|
89
89
|
export declare function latLngBoundNorthEastPoint(bound: LatLngBound): LatLngPoint;
|
|
90
90
|
/**
|
|
91
91
|
* Derives the north-west corner point from the bound's `ne` latitude and `sw` longitude.
|
|
92
92
|
*
|
|
93
|
-
* @param bound -
|
|
94
|
-
* @returns
|
|
93
|
+
* @param bound - Bound to read.
|
|
94
|
+
* @returns The computed north-west corner point.
|
|
95
95
|
*/
|
|
96
96
|
export declare function latLngBoundNorthWestPoint(bound: LatLngBound): LatLngPoint;
|
|
97
97
|
/**
|
|
98
98
|
* Derives the south-east corner point from the bound's `sw` latitude and `ne` longitude.
|
|
99
99
|
*
|
|
100
|
-
* @param bound -
|
|
101
|
-
* @returns
|
|
100
|
+
* @param bound - Bound to read.
|
|
101
|
+
* @returns The computed south-east corner point.
|
|
102
102
|
*/
|
|
103
103
|
export declare function latLngBoundSouthEastPoint(bound: LatLngBound): LatLngPoint;
|
|
104
104
|
/**
|
|
105
105
|
* Returns the south-west corner point of the bound.
|
|
106
106
|
*
|
|
107
|
-
* @param bound -
|
|
108
|
-
* @returns
|
|
107
|
+
* @param bound - Bound to read.
|
|
108
|
+
* @returns The `sw` corner point.
|
|
109
109
|
*/
|
|
110
110
|
export declare function latLngBoundSouthWestPoint(bound: LatLngBound): LatLngPoint;
|
|
111
111
|
/**
|
|
112
112
|
* Computes the geographic center of the bound by averaging the corner coordinates.
|
|
113
113
|
*
|
|
114
|
-
* @param bound -
|
|
115
|
-
* @returns
|
|
114
|
+
* @param bound - Bound to compute the center of.
|
|
115
|
+
* @returns The center point.
|
|
116
116
|
*
|
|
117
117
|
* @example
|
|
118
118
|
* ```ts
|
|
@@ -125,29 +125,29 @@ export declare function latLngBoundCenterPoint(bound: LatLngBound): LatLngPoint;
|
|
|
125
125
|
/**
|
|
126
126
|
* Returns the northern latitude boundary (the `ne` latitude).
|
|
127
127
|
*
|
|
128
|
-
* @param bound -
|
|
129
|
-
* @returns
|
|
128
|
+
* @param bound - Bound to read.
|
|
129
|
+
* @returns The latitude of the north edge.
|
|
130
130
|
*/
|
|
131
131
|
export declare function latLngBoundNorthBound(bound: LatLngBound): number;
|
|
132
132
|
/**
|
|
133
133
|
* Returns the southern latitude boundary (the `sw` latitude).
|
|
134
134
|
*
|
|
135
|
-
* @param bound -
|
|
136
|
-
* @returns
|
|
135
|
+
* @param bound - Bound to read.
|
|
136
|
+
* @returns The latitude of the south edge.
|
|
137
137
|
*/
|
|
138
138
|
export declare function latLngBoundSouthBound(bound: LatLngBound): number;
|
|
139
139
|
/**
|
|
140
140
|
* Returns the eastern longitude boundary (the `ne` longitude).
|
|
141
141
|
*
|
|
142
|
-
* @param bound -
|
|
143
|
-
* @returns
|
|
142
|
+
* @param bound - Bound to read.
|
|
143
|
+
* @returns The longitude of the east edge.
|
|
144
144
|
*/
|
|
145
145
|
export declare function latLngBoundEastBound(bound: LatLngBound): number;
|
|
146
146
|
/**
|
|
147
147
|
* Returns the western longitude boundary (the `sw` longitude).
|
|
148
148
|
*
|
|
149
|
-
* @param bound -
|
|
150
|
-
* @returns
|
|
149
|
+
* @param bound - Bound to read.
|
|
150
|
+
* @returns The longitude of the west edge.
|
|
151
151
|
*/
|
|
152
152
|
export declare function latLngBoundWestBound(bound: LatLngBound): number;
|
|
153
153
|
/**
|
|
@@ -165,9 +165,9 @@ export type LatLngBoundInput = LatLngBound | LatLngBoundTuple | LatLngBoundTuple
|
|
|
165
165
|
/**
|
|
166
166
|
* Convenience function that creates a {@link LatLngBoundTuple} using the default configuration.
|
|
167
167
|
*
|
|
168
|
-
* @param input -
|
|
169
|
-
* @param inputNe -
|
|
170
|
-
* @returns
|
|
168
|
+
* @param input - A sw point or any bound input.
|
|
169
|
+
* @param inputNe - Optional ne point when providing two separate points.
|
|
170
|
+
* @returns A tuple of `[sw, ne]` points.
|
|
171
171
|
*/
|
|
172
172
|
export declare function latLngBoundTuple(input: LatLngBoundSouthWestPoint | LatLngBoundInput, inputNe?: LatLngBoundNothEastPoint): LatLngBoundTuple;
|
|
173
173
|
/**
|
|
@@ -179,23 +179,24 @@ export type LatLngBoundTupleFunctionConfig = LatLngBoundFunctionConfig;
|
|
|
179
179
|
* Creates a {@link LatLngBoundTupleFunction} that converts various bound inputs into a `[sw, ne]` tuple,
|
|
180
180
|
* applying optional precision to the resulting points.
|
|
181
181
|
*
|
|
182
|
+
* @param config - Optional configuration for point precision.
|
|
183
|
+
* @returns Produces bound tuples from flexible inputs.
|
|
184
|
+
*
|
|
182
185
|
* @dbxUtil
|
|
183
186
|
* @dbxUtilCategory value
|
|
184
187
|
* @dbxUtilKind factory
|
|
185
188
|
* @dbxUtilTags value, lat-lng, bound, tuple, factory, geographic
|
|
186
189
|
* @dbxUtilRelated lat-lng-bound-function, lat-lng-bound
|
|
187
190
|
*
|
|
188
|
-
* @param config - optional configuration for point precision
|
|
189
|
-
* @returns a function that produces bound tuples from flexible inputs
|
|
190
191
|
* @__NO_SIDE_EFFECTS__
|
|
191
192
|
*/
|
|
192
193
|
export declare function latLngBoundTupleFunction(config?: LatLngBoundTupleFunctionConfig): LatLngBoundTupleFunction;
|
|
193
194
|
/**
|
|
194
195
|
* Convenience function that creates a {@link LatLngBound} using the default configuration.
|
|
195
196
|
*
|
|
196
|
-
* @param input -
|
|
197
|
-
* @param inputNe -
|
|
198
|
-
* @returns
|
|
197
|
+
* @param input - A sw point or any bound input.
|
|
198
|
+
* @param inputNe - Optional ne point when providing two separate points.
|
|
199
|
+
* @returns A bound object.
|
|
199
200
|
*
|
|
200
201
|
* @example
|
|
201
202
|
* ```ts
|
|
@@ -215,11 +216,11 @@ export interface LatLngBoundFunctionConfig {
|
|
|
215
216
|
/**
|
|
216
217
|
* Point function to use for calculations.
|
|
217
218
|
*/
|
|
218
|
-
pointFunction?: LatLngPointFunction;
|
|
219
|
+
readonly pointFunction?: LatLngPointFunction;
|
|
219
220
|
/**
|
|
220
221
|
* LatLngPrecision to use if pointFunction is not provided.
|
|
221
222
|
*/
|
|
222
|
-
precision?: LatLngPrecision;
|
|
223
|
+
readonly precision?: LatLngPrecision;
|
|
223
224
|
}
|
|
224
225
|
/**
|
|
225
226
|
* Creates a {@link LatLngBoundFunction} that normalizes various bound input formats into a {@link LatLngBound}.
|
|
@@ -227,9 +228,9 @@ export interface LatLngBoundFunctionConfig {
|
|
|
227
228
|
* Supports creating bounds from: two separate points, a `[sw, ne]` tuple, a four-point tuple (computes min/max extents),
|
|
228
229
|
* or a pre-existing bound object.
|
|
229
230
|
*
|
|
230
|
-
* @param config -
|
|
231
|
-
* @returns
|
|
232
|
-
* @throws {Error}
|
|
231
|
+
* @param config - Optional configuration for point precision and custom point functions.
|
|
232
|
+
* @returns Produces bounds from flexible inputs.
|
|
233
|
+
* @throws {Error} When the input cannot be parsed into a valid bound.
|
|
233
234
|
*
|
|
234
235
|
* @dbxUtil
|
|
235
236
|
* @dbxUtilCategory value
|
|
@@ -243,6 +244,7 @@ export interface LatLngBoundFunctionConfig {
|
|
|
243
244
|
* const result = fn([{ lat: 20, lng: 20 }, { lat: 30, lng: 30 }]);
|
|
244
245
|
* // result.sw.lat === 20, result.ne.lat === 30
|
|
245
246
|
* ```
|
|
247
|
+
*
|
|
246
248
|
* @__NO_SIDE_EFFECTS__
|
|
247
249
|
*/
|
|
248
250
|
export declare function latLngBoundFunction(config?: LatLngBoundFunctionConfig): LatLngBoundFunction;
|
|
@@ -255,8 +257,8 @@ export type ExtendLatLngBoundInput = ArrayOrValue<LatLngBoundOrPoint>;
|
|
|
255
257
|
*
|
|
256
258
|
* When given an array, the first element seeds the initial bound and subsequent elements extend it.
|
|
257
259
|
*
|
|
258
|
-
* @param input -
|
|
259
|
-
* @returns
|
|
260
|
+
* @param input - One or more points/bounds to derive the bounding box from.
|
|
261
|
+
* @returns The computed bound, or `undefined` if the input is empty.
|
|
260
262
|
*
|
|
261
263
|
* @example
|
|
262
264
|
* ```ts
|
|
@@ -273,9 +275,9 @@ export declare function latLngBoundFromInput(input: ExtendLatLngBoundInput): May
|
|
|
273
275
|
*
|
|
274
276
|
* The returned bound's `sw` corner uses the minimum lat/lng encountered, and its `ne` corner uses the maximum.
|
|
275
277
|
*
|
|
276
|
-
* @param bound -
|
|
277
|
-
* @param extendWith -
|
|
278
|
-
* @returns
|
|
278
|
+
* @param bound - The starting bound to extend.
|
|
279
|
+
* @param extendWith - One or more points/bounds to include.
|
|
280
|
+
* @returns A new bound that encompasses the original and all extensions.
|
|
279
281
|
*/
|
|
280
282
|
export declare function extendLatLngBound(bound: LatLngBound, extendWith: ExtendLatLngBoundInput): LatLngBound;
|
|
281
283
|
/**
|
|
@@ -295,22 +297,23 @@ export type IsWithinLatLngBoundFunction = LatLngBoundCheckFunction & {
|
|
|
295
297
|
* falls entirely within the specified bound. Points are checked directly; bounds require
|
|
296
298
|
* both corners to be within.
|
|
297
299
|
*
|
|
300
|
+
* @param bound - The reference bound to check containment against.
|
|
301
|
+
* @returns Returns `true` if the input is within the reference bound.
|
|
302
|
+
*
|
|
298
303
|
* @dbxUtil
|
|
299
304
|
* @dbxUtilCategory value
|
|
300
305
|
* @dbxUtilKind factory
|
|
301
306
|
* @dbxUtilTags value, lat-lng, bound, contains, decision, factory, geographic
|
|
302
307
|
* @dbxUtilRelated overlaps-lat-lng-bound-function, is-lat-lng-point-within-lat-lng-bound
|
|
303
308
|
*
|
|
304
|
-
* @param bound - the reference bound to check containment against
|
|
305
|
-
* @returns a function that returns `true` if the input is within the reference bound
|
|
306
309
|
* @__NO_SIDE_EFFECTS__
|
|
307
310
|
*/
|
|
308
311
|
export declare function isWithinLatLngBoundFunction(bound: LatLngBound): IsWithinLatLngBoundFunction;
|
|
309
312
|
/**
|
|
310
313
|
* Checks whether one bound is entirely contained within another by verifying both its corners are within the outer bound.
|
|
311
314
|
*
|
|
312
|
-
* @param bound -
|
|
313
|
-
* @param within -
|
|
315
|
+
* @param bound - The inner bound to test.
|
|
316
|
+
* @param within - The outer bound to test against.
|
|
314
317
|
* @returns `true` if both corners of `bound` are within `within`
|
|
315
318
|
*/
|
|
316
319
|
export declare function isLatLngBoundWithinLatLngBound(bound: LatLngBound, within: LatLngBound): boolean;
|
|
@@ -318,9 +321,9 @@ export declare function isLatLngBoundWithinLatLngBound(bound: LatLngBound, withi
|
|
|
318
321
|
* Checks whether a point lies within a bound. Handles bounds that wrap the antimeridian by checking
|
|
319
322
|
* if the longitude falls on either side of the wrap.
|
|
320
323
|
*
|
|
321
|
-
* @param point -
|
|
322
|
-
* @param within -
|
|
323
|
-
* @returns `true` if the point is within the bound
|
|
324
|
+
* @param point - The point to test.
|
|
325
|
+
* @param within - The bound to test against.
|
|
326
|
+
* @returns `true` if the point is within the bound.
|
|
324
327
|
*
|
|
325
328
|
* @example
|
|
326
329
|
* ```ts
|
|
@@ -341,9 +344,9 @@ export type OverlapsLatLngBoundFunction = LatLngBoundCheckFunction & {
|
|
|
341
344
|
/**
|
|
342
345
|
* Checks whether two bounds overlap each other.
|
|
343
346
|
*
|
|
344
|
-
* @param a -
|
|
345
|
-
* @param b -
|
|
346
|
-
* @returns `true` if the bounds overlap
|
|
347
|
+
* @param a - The first bound.
|
|
348
|
+
* @param b - The second bound.
|
|
349
|
+
* @returns `true` if the bounds overlap.
|
|
347
350
|
*/
|
|
348
351
|
export declare function latLngBoundOverlapsLatLngBound(a: LatLngBound, b: LatLngBound): boolean;
|
|
349
352
|
/**
|
|
@@ -351,14 +354,15 @@ export declare function latLngBoundOverlapsLatLngBound(a: LatLngBound, b: LatLng
|
|
|
351
354
|
* overlaps the reference bound. Internally converts bounds to rectangles for overlap detection,
|
|
352
355
|
* handling antimeridian wrapping.
|
|
353
356
|
*
|
|
357
|
+
* @param bound - The reference bound to check overlap against.
|
|
358
|
+
* @returns Returns `true` if the input overlaps the reference bound.
|
|
359
|
+
*
|
|
354
360
|
* @dbxUtil
|
|
355
361
|
* @dbxUtilCategory value
|
|
356
362
|
* @dbxUtilKind factory
|
|
357
363
|
* @dbxUtilTags value, lat-lng, bound, overlap, decision, factory, geographic
|
|
358
364
|
* @dbxUtilRelated is-within-lat-lng-bound-function, lat-lng-bound-overlaps-lat-lng-bound
|
|
359
365
|
*
|
|
360
|
-
* @param bound - the reference bound to check overlap against
|
|
361
|
-
* @returns a function that returns `true` if the input overlaps the reference bound
|
|
362
366
|
* @__NO_SIDE_EFFECTS__
|
|
363
367
|
*/
|
|
364
368
|
export declare function overlapsLatLngBoundFunction(bound: LatLngBound): OverlapsLatLngBoundFunction;
|
|
@@ -371,7 +375,7 @@ export declare const TOTAL_SPAN_OF_LONGITUDE = 360;
|
|
|
371
375
|
* where the left edge (-180 longitude) begins at x=360. This allows safe rectangle-based
|
|
372
376
|
* overlap comparisons without worrying about antimeridian wrapping.
|
|
373
377
|
*
|
|
374
|
-
* @param bound -
|
|
375
|
-
* @returns
|
|
378
|
+
* @param bound - The geographic bound to convert.
|
|
379
|
+
* @returns A rectangle suitable for overlap calculations.
|
|
376
380
|
*/
|
|
377
381
|
export declare function boundToRectangle(bound: LatLngBound): Rectangle;
|
package/src/lib/value/build.d.ts
CHANGED
|
@@ -16,21 +16,21 @@ export interface BuildConfig<T extends object> {
|
|
|
16
16
|
/**
|
|
17
17
|
* Optional pre-existing partial object to build upon. If omitted, an empty object is used.
|
|
18
18
|
*/
|
|
19
|
-
base?: Building<T>;
|
|
19
|
+
readonly base?: Building<T>;
|
|
20
20
|
/**
|
|
21
21
|
* Function that mutates the base to populate it with the desired values.
|
|
22
22
|
*/
|
|
23
|
-
build: BuildFunction<T>;
|
|
23
|
+
readonly build: BuildFunction<T>;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Convenience function for imperatively constructing an object of a specific type by mutating a base object via a build function.
|
|
27
27
|
*
|
|
28
28
|
* This is useful when building objects whose type is normally read-only, allowing incremental property assignment during construction.
|
|
29
29
|
*
|
|
30
|
-
* @param config -
|
|
31
|
-
* @param config.base -
|
|
32
|
-
* @param config.build -
|
|
33
|
-
* @returns
|
|
30
|
+
* @param config - The build configuration containing the base object and build function.
|
|
31
|
+
* @param config.base - Optional pre-existing partial object to build upon; defaults to an empty object.
|
|
32
|
+
* @param config.build - Function that mutates the base object to populate it with desired values.
|
|
33
|
+
* @returns The fully constructed object of type T.
|
|
34
34
|
*
|
|
35
35
|
* @dbxUtil
|
|
36
36
|
* @dbxUtilCategory value
|
|
@@ -11,8 +11,8 @@ export type EqualityComparatorFunction<T> = (a: T, b: T) => boolean;
|
|
|
11
11
|
* When both are nullish, it uses strict equality (`===`), so `null === null` is `true`
|
|
12
12
|
* but `null === undefined` is `false`.
|
|
13
13
|
*
|
|
14
|
-
* @param compare -
|
|
15
|
-
* @returns
|
|
14
|
+
* @param compare - The comparator to wrap.
|
|
15
|
+
* @returns A new comparator that handles nullish values safely before delegating to the wrapped comparator.
|
|
16
16
|
*
|
|
17
17
|
* @dbxUtil
|
|
18
18
|
* @dbxUtilCategory value
|
|
@@ -27,6 +27,7 @@ export type EqualityComparatorFunction<T> = (a: T, b: T) => boolean;
|
|
|
27
27
|
* safeCompare(null, null); // true
|
|
28
28
|
* safeCompare(null, undefined); // false
|
|
29
29
|
* ```
|
|
30
|
+
*
|
|
30
31
|
* @__NO_SIDE_EFFECTS__
|
|
31
32
|
*/
|
|
32
33
|
export declare function safeEqualityComparatorFunction<T>(compare: EqualityComparatorFunction<T>): EqualityComparatorFunction<Maybe<T>>;
|
|
@@ -36,10 +37,10 @@ export declare function safeEqualityComparatorFunction<T>(compare: EqualityCompa
|
|
|
36
37
|
* Delegates to {@link safeEqualityComparatorFunction} internally, so nullish values are handled
|
|
37
38
|
* without invoking the comparator.
|
|
38
39
|
*
|
|
39
|
-
* @param a -
|
|
40
|
-
* @param b -
|
|
41
|
-
* @param compare -
|
|
42
|
-
* @returns `true` if the values are considered equal
|
|
40
|
+
* @param a - First value to compare.
|
|
41
|
+
* @param b - Second value to compare.
|
|
42
|
+
* @param compare - The equality comparator for non-nullish values.
|
|
43
|
+
* @returns `true` if the values are considered equal.
|
|
43
44
|
*
|
|
44
45
|
* @dbxUtil
|
|
45
46
|
* @dbxUtilCategory value
|
|
@@ -79,15 +80,16 @@ export type CompareEqualityWithValueFromItemsFunction<I, V> = ((a: Maybe<I>, b:
|
|
|
79
80
|
* This is a convenience wrapper around {@link compareEqualityWithValueFromItemsFunctionFactory} that
|
|
80
81
|
* accepts both the value reader and comparator in a single call.
|
|
81
82
|
*
|
|
83
|
+
* @param readValues - Extracts the comparable value from each item.
|
|
84
|
+
* @param equalityComparator - Compares the extracted values for equality.
|
|
85
|
+
* @returns Compares two items by their extracted values.
|
|
86
|
+
*
|
|
82
87
|
* @dbxUtil
|
|
83
88
|
* @dbxUtilCategory value
|
|
84
89
|
* @dbxUtilKind factory
|
|
85
90
|
* @dbxUtilTags value, comparator, equality, factory, read
|
|
86
91
|
* @dbxUtilRelated compare-equality-with-value-from-items-function-factory, safe-equality-comparator-function
|
|
87
92
|
*
|
|
88
|
-
* @param readValues - extracts the comparable value from each item
|
|
89
|
-
* @param equalityComparator - compares the extracted values for equality
|
|
90
|
-
* @returns a function that compares two items by their extracted values
|
|
91
93
|
* @__NO_SIDE_EFFECTS__
|
|
92
94
|
*/
|
|
93
95
|
export declare function compareEqualityWithValueFromItemsFunction<I, V>(readValues: ReadValueFunction<I, V>, equalityComparator: EqualityComparatorFunction<V>): CompareEqualityWithValueFromItemsFunction<I, V>;
|
|
@@ -101,8 +103,14 @@ export type CompareEqualityWithValueFromItemsFunctionFactory<I, V> = ((equalityC
|
|
|
101
103
|
* The returned factory accepts different equality comparators, allowing reuse of the same value extraction logic
|
|
102
104
|
* with varying comparison strategies.
|
|
103
105
|
*
|
|
104
|
-
* @param readValues -
|
|
105
|
-
* @returns
|
|
106
|
+
* @param readValues - Extracts the comparable value from each item.
|
|
107
|
+
* @returns A factory function that accepts an equality comparator and produces a comparison function.
|
|
108
|
+
*
|
|
109
|
+
* @dbxUtil
|
|
110
|
+
* @dbxUtilCategory value
|
|
111
|
+
* @dbxUtilKind factory
|
|
112
|
+
* @dbxUtilTags value, comparator, equality, factory, read, reuse
|
|
113
|
+
* @dbxUtilRelated compare-equality-with-value-from-items-function, safe-equality-comparator-function
|
|
106
114
|
*
|
|
107
115
|
* @example
|
|
108
116
|
* ```ts
|
|
@@ -115,12 +123,6 @@ export type CompareEqualityWithValueFromItemsFunctionFactory<I, V> = ((equalityC
|
|
|
115
123
|
* fn(0, 1); // false
|
|
116
124
|
* ```
|
|
117
125
|
*
|
|
118
|
-
* @dbxUtil
|
|
119
|
-
* @dbxUtilCategory value
|
|
120
|
-
* @dbxUtilKind factory
|
|
121
|
-
* @dbxUtilTags value, comparator, equality, factory, read, reuse
|
|
122
|
-
* @dbxUtilRelated compare-equality-with-value-from-items-function, safe-equality-comparator-function
|
|
123
|
-
*
|
|
124
126
|
* @__NO_SIDE_EFFECTS__
|
|
125
127
|
*/
|
|
126
128
|
export declare function compareEqualityWithValueFromItemsFunctionFactory<I, V>(readValues: ReadValueFunction<I, V>): CompareEqualityWithValueFromItemsFunctionFactory<I, V>;
|
package/src/lib/value/cron.d.ts
CHANGED
|
@@ -14,8 +14,8 @@ export type CronExpression = string;
|
|
|
14
14
|
* For values of 60 or more, the expression is split into hours and minutes (e.g., 90 minutes becomes
|
|
15
15
|
* every 1 hour at minute 30), which means intervals won't be exactly N minutes apart.
|
|
16
16
|
*
|
|
17
|
-
* @param inputMinutes -
|
|
18
|
-
* @returns
|
|
17
|
+
* @param inputMinutes - Interval in minutes between executions.
|
|
18
|
+
* @returns A cron expression string that approximates the requested interval.
|
|
19
19
|
*
|
|
20
20
|
* @example
|
|
21
21
|
* ```ts
|
|
@@ -18,8 +18,8 @@ export type DecisionFunctionFactory<C, I> = FactoryWithRequiredInput<DecisionFun
|
|
|
18
18
|
*
|
|
19
19
|
* Useful for providing a constant decision where a function is expected.
|
|
20
20
|
*
|
|
21
|
-
* @param decision -
|
|
22
|
-
* @returns
|
|
21
|
+
* @param decision - The constant boolean value to return.
|
|
22
|
+
* @returns A decision function that always returns the given boolean.
|
|
23
23
|
*
|
|
24
24
|
* @dbxUtil
|
|
25
25
|
* @dbxUtilCategory value
|
|
@@ -32,6 +32,7 @@ export type DecisionFunctionFactory<C, I> = FactoryWithRequiredInput<DecisionFun
|
|
|
32
32
|
* const alwaysTrue = decisionFunction(true);
|
|
33
33
|
* alwaysTrue('anything'); // true
|
|
34
34
|
* ```
|
|
35
|
+
*
|
|
35
36
|
* @__NO_SIDE_EFFECTS__
|
|
36
37
|
*/
|
|
37
38
|
export declare function decisionFunction<I>(decision: boolean): DecisionFunction<I>;
|
|
@@ -56,9 +57,9 @@ export declare const invertDecision: <F extends DecisionFunction<any>>(fn: F, in
|
|
|
56
57
|
*
|
|
57
58
|
* If the input is undefined, falls back to a constant function returning `defaultIfUndefined`.
|
|
58
59
|
*
|
|
59
|
-
* @param valueOrFunction -
|
|
60
|
-
* @param defaultIfUndefined -
|
|
61
|
-
* @returns
|
|
60
|
+
* @param valueOrFunction - Boolean constant, {@link DecisionFunction}, or undefined to use the default.
|
|
61
|
+
* @param defaultIfUndefined - Fallback boolean when the input is nullish (defaults to true)
|
|
62
|
+
* @returns A {@link DecisionFunction} derived from the input.
|
|
62
63
|
*
|
|
63
64
|
* @dbxUtil
|
|
64
65
|
* @dbxUtilCategory value
|
package/src/lib/value/equal.d.ts
CHANGED
|
@@ -14,9 +14,9 @@ export type AreEqualContext<T = unknown> = (x: IterableOrValue<T>) => boolean;
|
|
|
14
14
|
* Creates an {@link IsEqualContext} that captures a reference value and uses the provided comparator
|
|
15
15
|
* to check whether subsequent values are equal to it.
|
|
16
16
|
*
|
|
17
|
-
* @param contextValue -
|
|
18
|
-
* @param fn -
|
|
19
|
-
* @returns
|
|
17
|
+
* @param contextValue - The reference value to compare against.
|
|
18
|
+
* @param fn - The equality comparator.
|
|
19
|
+
* @returns Checks whether a given value equals the captured reference.
|
|
20
20
|
*
|
|
21
21
|
* @dbxUtil
|
|
22
22
|
* @dbxUtilCategory value
|
|
@@ -32,6 +32,7 @@ export type AreEqualContext<T = unknown> = (x: IterableOrValue<T>) => boolean;
|
|
|
32
32
|
* context(0); // true
|
|
33
33
|
* context(10); // false
|
|
34
34
|
* ```
|
|
35
|
+
*
|
|
35
36
|
* @__NO_SIDE_EFFECTS__
|
|
36
37
|
*/
|
|
37
38
|
export declare function isEqualContext<T>(contextValue: T, fn: EqualityComparatorFunction<T>): IsEqualContext<T>;
|
|
@@ -41,9 +42,9 @@ export declare function isEqualContext<T>(contextValue: T, fn: EqualityComparato
|
|
|
41
42
|
*
|
|
42
43
|
* Returns `true` only if every value in the input matches the context value according to the comparator.
|
|
43
44
|
*
|
|
44
|
-
* @param contextValue -
|
|
45
|
-
* @param fn -
|
|
46
|
-
* @returns
|
|
45
|
+
* @param contextValue - The reference value to compare against.
|
|
46
|
+
* @param fn - The equality comparator.
|
|
47
|
+
* @returns Checks whether all input values equal the captured reference.
|
|
47
48
|
*
|
|
48
49
|
* @dbxUtil
|
|
49
50
|
* @dbxUtilCategory value
|
|
@@ -59,6 +60,7 @@ export declare function isEqualContext<T>(contextValue: T, fn: EqualityComparato
|
|
|
59
60
|
* context([0, 0, 0]); // true
|
|
60
61
|
* context([0, 1, 2]); // false
|
|
61
62
|
* ```
|
|
63
|
+
*
|
|
62
64
|
* @__NO_SIDE_EFFECTS__
|
|
63
65
|
*/
|
|
64
66
|
export declare function areEqualContext<T>(contextValue: T, fn: EqualityComparatorFunction<T>): AreEqualContext<T>;
|
|
@@ -68,9 +70,9 @@ export declare function areEqualContext<T>(contextValue: T, fn: EqualityComparat
|
|
|
68
70
|
* Empty iterables and single-value inputs return `true` by default, since there is nothing to contradict equality.
|
|
69
71
|
* Uses the first value as the reference and checks all remaining values against it.
|
|
70
72
|
*
|
|
71
|
-
* @param values -
|
|
72
|
-
* @param fn -
|
|
73
|
-
* @returns `true` if all values are equal to each other, or if fewer than two values are provided
|
|
73
|
+
* @param values - The values to compare.
|
|
74
|
+
* @param fn - The equality comparator.
|
|
75
|
+
* @returns `true` if all values are equal to each other, or if fewer than two values are provided.
|
|
74
76
|
*
|
|
75
77
|
* @dbxUtil
|
|
76
78
|
* @dbxUtilCategory value
|