@dereekb/util 13.11.14 → 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.
Files changed (204) hide show
  1. package/eslint/index.cjs.js +10008 -394
  2. package/eslint/index.esm.js +9982 -392
  3. package/eslint/package.json +4 -4
  4. package/eslint/src/lib/comments.d.ts +14 -3
  5. package/eslint/src/lib/dbx-tag-families.d.ts +280 -0
  6. package/eslint/src/lib/index.d.ts +26 -3
  7. package/eslint/src/lib/jsdoc-parser.d.ts +116 -0
  8. package/eslint/src/lib/no-inline-string-empty-object-intersection.rule.d.ts +44 -0
  9. package/eslint/src/lib/no-inline-type-import.rule.d.ts +38 -0
  10. package/eslint/src/lib/no-sister-re-export.rule.d.ts +69 -0
  11. package/eslint/src/lib/plugin.d.ts +52 -1
  12. package/eslint/src/lib/prefer-canonical-jsdoc.rule.d.ts +68 -0
  13. package/eslint/src/lib/prefer-config-object.rule.d.ts +61 -0
  14. package/eslint/src/lib/prefer-maybe-type.rule.d.ts +72 -0
  15. package/eslint/src/lib/prefer-no-side-effects-in-jsdoc.rule.d.ts +1 -1
  16. package/eslint/src/lib/prefer-suggested-string.rule.d.ts +51 -0
  17. package/eslint/src/lib/require-constant-naming.rule.d.ts +63 -0
  18. package/eslint/src/lib/require-dbx-action-companion-tags.rule.d.ts +46 -0
  19. package/eslint/src/lib/require-dbx-auth-companion-tags.rule.d.ts +45 -0
  20. package/eslint/src/lib/require-dbx-docs-ui-example-companion-tags.rule.d.ts +42 -0
  21. package/eslint/src/lib/require-dbx-filter-companion-tags.rule.d.ts +43 -0
  22. package/eslint/src/lib/require-dbx-form-field-companion-tags.rule.d.ts +46 -0
  23. package/eslint/src/lib/require-dbx-model-companion-tags.rule.d.ts +46 -0
  24. package/eslint/src/lib/require-dbx-model-firebase-index-companion-tags.rule.d.ts +44 -0
  25. package/eslint/src/lib/require-dbx-model-snapshot-field-companion-tags.rule.d.ts +44 -0
  26. package/eslint/src/lib/require-dbx-pipe-companion-tags.rule.d.ts +43 -0
  27. package/eslint/src/lib/require-dbx-rule-companion-tags.rule.d.ts +44 -0
  28. package/eslint/src/lib/require-dbx-util-companion-tags.rule.d.ts +74 -0
  29. package/eslint/src/lib/require-dbx-web-companion-tags.rule.d.ts +43 -0
  30. package/eslint/src/lib/require-default-prefix-naming.rule.d.ts +60 -0
  31. package/eslint/src/lib/require-deprecated-alias-placement.rule.d.ts +75 -0
  32. package/eslint/src/lib/require-exported-jsdoc-example.rule.d.ts +61 -0
  33. package/eslint/src/lib/require-no-side-effects.rule.d.ts +1 -1
  34. package/eslint/src/lib/require-readonly-config-params.rule.d.ts +57 -0
  35. package/eslint/src/lib/require-single-return.rule.d.ts +42 -0
  36. package/fetch/index.cjs.js +95 -80
  37. package/fetch/index.esm.js +95 -80
  38. package/fetch/package.json +2 -2
  39. package/fetch/src/lib/error.d.ts +2 -2
  40. package/fetch/src/lib/fetch.d.ts +15 -15
  41. package/fetch/src/lib/fetch.file.d.ts +5 -5
  42. package/fetch/src/lib/fetch.limit.d.ts +2 -2
  43. package/fetch/src/lib/fetch.page.d.ts +1 -1
  44. package/fetch/src/lib/fetch.page.iterate.d.ts +4 -4
  45. package/fetch/src/lib/fetch.type.d.ts +3 -2
  46. package/fetch/src/lib/fetch.url.d.ts +13 -13
  47. package/fetch/src/lib/json.d.ts +12 -12
  48. package/fetch/src/lib/timeout.d.ts +2 -2
  49. package/fetch/src/lib/url.d.ts +11 -11
  50. package/index.cjs.js +2592 -2329
  51. package/index.esm.js +2590 -2327
  52. package/package.json +1 -1
  53. package/src/lib/array/array.boolean.d.ts +20 -20
  54. package/src/lib/array/array.d.ts +73 -72
  55. package/src/lib/array/array.factory.d.ts +8 -5
  56. package/src/lib/array/array.filter.d.ts +23 -20
  57. package/src/lib/array/array.find.d.ts +9 -8
  58. package/src/lib/array/array.index.d.ts +15 -14
  59. package/src/lib/array/array.indexed.d.ts +22 -19
  60. package/src/lib/array/array.make.d.ts +3 -2
  61. package/src/lib/array/array.map.d.ts +5 -5
  62. package/src/lib/array/array.number.d.ts +27 -27
  63. package/src/lib/array/array.random.d.ts +11 -10
  64. package/src/lib/array/array.set.d.ts +14 -14
  65. package/src/lib/array/array.string.d.ts +31 -31
  66. package/src/lib/array/array.unique.d.ts +22 -20
  67. package/src/lib/array/array.value.d.ts +3 -2
  68. package/src/lib/assertion/assert.error.d.ts +8 -8
  69. package/src/lib/assertion/assertion.d.ts +5 -5
  70. package/src/lib/assertion/assertion.generic.d.ts +3 -3
  71. package/src/lib/assertion/assertion.number.d.ts +6 -6
  72. package/src/lib/auth/auth.role.claims.d.ts +12 -11
  73. package/src/lib/auth/auth.role.d.ts +3 -3
  74. package/src/lib/auth/pkce.d.ts +2 -2
  75. package/src/lib/boolean.d.ts +11 -11
  76. package/src/lib/cache/cache.memoize.d.ts +6 -6
  77. package/src/lib/contact/domain.d.ts +9 -9
  78. package/src/lib/contact/email.d.ts +11 -11
  79. package/src/lib/contact/phone.d.ts +12 -12
  80. package/src/lib/contact/random.d.ts +11 -9
  81. package/src/lib/date/date.d.ts +60 -59
  82. package/src/lib/date/date.time.d.ts +2 -2
  83. package/src/lib/date/date.unix.d.ts +8 -8
  84. package/src/lib/date/duration.d.ts +17 -17
  85. package/src/lib/date/expires.d.ts +29 -27
  86. package/src/lib/date/hour.d.ts +23 -23
  87. package/src/lib/date/minute.d.ts +6 -6
  88. package/src/lib/date/time.d.ts +10 -9
  89. package/src/lib/date/week.d.ts +32 -31
  90. package/src/lib/encryption/encryption.object.d.ts +3 -3
  91. package/src/lib/error/error.d.ts +13 -12
  92. package/src/lib/error/error.server.d.ts +4 -4
  93. package/src/lib/file/pdf.d.ts +4 -4
  94. package/src/lib/filter/filter.d.ts +3 -2
  95. package/src/lib/function/function.boolean.d.ts +4 -3
  96. package/src/lib/function/function.forward.d.ts +6 -4
  97. package/src/lib/getter/getter.d.ts +24 -19
  98. package/src/lib/getter/getter.map.d.ts +6 -5
  99. package/src/lib/getter/getter.util.d.ts +3 -2
  100. package/src/lib/grouping.d.ts +25 -24
  101. package/src/lib/hash.d.ts +11 -10
  102. package/src/lib/iterable/iterable.d.ts +39 -39
  103. package/src/lib/iterable/iterable.map.d.ts +3 -3
  104. package/src/lib/key.d.ts +16 -16
  105. package/src/lib/map/map.d.ts +12 -12
  106. package/src/lib/map/map.intersection.d.ts +3 -3
  107. package/src/lib/map/map.key.d.ts +16 -14
  108. package/src/lib/misc/host.d.ts +2 -2
  109. package/src/lib/model/id.batch.d.ts +4 -3
  110. package/src/lib/model/id.factory.d.ts +4 -3
  111. package/src/lib/model/model.conversion.d.ts +19 -14
  112. package/src/lib/model/model.conversion.field.d.ts +2 -2
  113. package/src/lib/model/model.copy.d.ts +5 -4
  114. package/src/lib/model/model.d.ts +48 -46
  115. package/src/lib/model/model.modify.d.ts +10 -8
  116. package/src/lib/nodejs/stream.d.ts +6 -5
  117. package/src/lib/number/bitwise.dencoder.d.ts +12 -12
  118. package/src/lib/number/bound.d.ts +16 -13
  119. package/src/lib/number/dollar.d.ts +6 -5
  120. package/src/lib/number/encoded.d.ts +7 -7
  121. package/src/lib/number/factory.d.ts +4 -3
  122. package/src/lib/number/number.d.ts +37 -37
  123. package/src/lib/number/random.d.ts +11 -10
  124. package/src/lib/number/round.d.ts +34 -30
  125. package/src/lib/number/sort.d.ts +3 -2
  126. package/src/lib/number/transform.d.ts +5 -4
  127. package/src/lib/object/object.array.d.ts +6 -6
  128. package/src/lib/object/object.array.delta.d.ts +3 -2
  129. package/src/lib/object/object.d.ts +12 -12
  130. package/src/lib/object/object.empty.d.ts +3 -3
  131. package/src/lib/object/object.equal.d.ts +11 -10
  132. package/src/lib/object/object.filter.pojo.d.ts +74 -74
  133. package/src/lib/object/object.filter.tuple.d.ts +26 -26
  134. package/src/lib/object/object.flatten.d.ts +4 -4
  135. package/src/lib/object/object.key.d.ts +6 -4
  136. package/src/lib/object/object.map.d.ts +15 -13
  137. package/src/lib/page/page.d.ts +5 -5
  138. package/src/lib/page/page.filter.d.ts +8 -8
  139. package/src/lib/path/path.d.ts +98 -88
  140. package/src/lib/promise/callback.d.ts +2 -2
  141. package/src/lib/promise/is.d.ts +6 -6
  142. package/src/lib/promise/poll.d.ts +9 -9
  143. package/src/lib/promise/promise.d.ts +33 -30
  144. package/src/lib/promise/promise.factory.d.ts +4 -3
  145. package/src/lib/promise/promise.loop.d.ts +11 -11
  146. package/src/lib/promise/promise.task.d.ts +6 -5
  147. package/src/lib/promise/promise.type.d.ts +3 -3
  148. package/src/lib/promise/use.d.ts +3 -3
  149. package/src/lib/relation/relation.d.ts +15 -15
  150. package/src/lib/service/handler.config.d.ts +20 -16
  151. package/src/lib/service/handler.d.ts +3 -2
  152. package/src/lib/service/typed.service.d.ts +2 -2
  153. package/src/lib/set/set.d.ts +62 -59
  154. package/src/lib/set/set.delta.d.ts +5 -4
  155. package/src/lib/set/set.hashset.d.ts +5 -5
  156. package/src/lib/set/set.selection.d.ts +5 -4
  157. package/src/lib/sort.d.ts +11 -11
  158. package/src/lib/storage/storage.d.ts +2 -1
  159. package/src/lib/storage/storage.error.d.ts +4 -4
  160. package/src/lib/storage/storage.memory.d.ts +7 -7
  161. package/src/lib/storage/storage.object.d.ts +5 -5
  162. package/src/lib/string/case.d.ts +6 -6
  163. package/src/lib/string/char.d.ts +30 -29
  164. package/src/lib/string/dencoder.d.ts +25 -20
  165. package/src/lib/string/factory.d.ts +11 -8
  166. package/src/lib/string/html.d.ts +19 -19
  167. package/src/lib/string/mimetype.d.ts +9 -8
  168. package/src/lib/string/prefix.d.ts +8 -8
  169. package/src/lib/string/replace.d.ts +45 -39
  170. package/src/lib/string/search.d.ts +5 -4
  171. package/src/lib/string/sort.d.ts +13 -4
  172. package/src/lib/string/string.d.ts +44 -43
  173. package/src/lib/string/transform.d.ts +32 -23
  174. package/src/lib/string/tree.d.ts +5 -4
  175. package/src/lib/string/url.d.ts +5 -4
  176. package/src/lib/tree/tree.array.d.ts +5 -4
  177. package/src/lib/tree/tree.expand.d.ts +6 -6
  178. package/src/lib/tree/tree.explore.d.ts +13 -10
  179. package/src/lib/tree/tree.flatten.d.ts +10 -10
  180. package/src/lib/type.d.ts +42 -12
  181. package/src/lib/value/address.d.ts +7 -7
  182. package/src/lib/value/bound.d.ts +70 -66
  183. package/src/lib/value/build.d.ts +6 -6
  184. package/src/lib/value/comparator.d.ts +19 -17
  185. package/src/lib/value/cron.d.ts +2 -2
  186. package/src/lib/value/decision.d.ts +6 -5
  187. package/src/lib/value/equal.d.ts +11 -9
  188. package/src/lib/value/indexed.d.ts +101 -85
  189. package/src/lib/value/label.d.ts +2 -2
  190. package/src/lib/value/map.d.ts +20 -16
  191. package/src/lib/value/maybe.d.ts +36 -36
  192. package/src/lib/value/modifier.d.ts +24 -23
  193. package/src/lib/value/point.d.ts +85 -77
  194. package/src/lib/value/url.d.ts +2 -2
  195. package/src/lib/value/use.d.ts +36 -33
  196. package/src/lib/value/vector.d.ts +15 -14
  197. package/test/index.cjs.js +41 -36
  198. package/test/index.esm.js +41 -36
  199. package/test/package.json +2 -2
  200. package/test/src/lib/jest/jest.fail.d.ts +2 -2
  201. package/test/src/lib/shared/shared.d.ts +20 -20
  202. package/test/src/lib/shared/shared.fail.d.ts +21 -16
  203. package/test/src/lib/shared/shared.function.d.ts +4 -4
  204. package/test/src/lib/shared/shared.wrap.d.ts +10 -10
@@ -26,22 +26,22 @@ export declare const FRACTIONAL_HOURS_PRECISION_FUNCTION: import("..").CutValueT
26
26
  *
27
27
  * Minutes are rounded down before conversion.
28
28
  *
29
- * @param minutes - Number of minutes to convert
30
- * @returns The equivalent fractional hour value
29
+ * @param minutes - Number of minutes to convert.
30
+ * @returns The equivalent fractional hour value.
31
31
  */
32
32
  export declare function minutesToFractionalHours(minutes: Minutes): FractionalHour;
33
33
  /**
34
34
  * Converts a fractional hour value to the equivalent number of minutes.
35
35
  *
36
- * @param hours - Fractional hour value to convert
36
+ * @param hours - Fractional hour value to convert.
37
37
  * @returns The equivalent number of minutes (rounded)
38
38
  */
39
39
  export declare function fractionalHoursToMinutes(hours: FractionalHour): Minutes;
40
40
  /**
41
41
  * Rounds the input hour to the nearest FractionalHour precision (3 decimal places).
42
42
  *
43
- * @param hour - The hour value to round
44
- * @returns The rounded fractional hour
43
+ * @param hour - The hour value to round.
44
+ * @returns The rounded fractional hour.
45
45
  */
46
46
  export declare function hourToFractionalHour(hour: Hours): FractionalHour;
47
47
  /**
@@ -54,9 +54,9 @@ export interface ComputeFractionalHour {
54
54
  /**
55
55
  * Computes the next fractional hour by adding the specified hours and minutes to the input value.
56
56
  *
57
- * @param input - The starting fractional hour value
58
- * @param change - The hours and/or minutes to add
59
- * @returns The resulting fractional hour
57
+ * @param input - The starting fractional hour value.
58
+ * @param change - The hours and/or minutes to add.
59
+ * @returns The resulting fractional hour.
60
60
  */
61
61
  export declare function computeNextFractionalHour(input: FractionalHour, change: ComputeFractionalHour): FractionalHour;
62
62
  /**
@@ -74,8 +74,8 @@ export declare const HOUR_OF_DAY_MAXMIMUM: number;
74
74
  /**
75
75
  * Returns true if the input value is a valid HourOfDay (0-23).
76
76
  *
77
- * @param input - The number to validate
78
- * @returns True if the input is within the valid HourOfDay range
77
+ * @param input - Candidate value to validate against the HourOfDay range.
78
+ * @returns True when the value falls within 0-23.
79
79
  */
80
80
  export declare function isHourOfDay(input: number): input is HourOfDay;
81
81
  /**
@@ -93,8 +93,8 @@ export declare const MINUTE_OF_DAY_MAXMIMUM: number;
93
93
  /**
94
94
  * Returns true if the input value is a valid MinuteOfDay (0-1439).
95
95
  *
96
- * @param input - The number to validate
97
- * @returns True if the input is within the valid MinuteOfDay range
96
+ * @param input - Candidate value to validate against the MinuteOfDay range.
97
+ * @returns True when the value falls within 0-1439.
98
98
  */
99
99
  export declare function isMinuteOfDay(input: number): input is MinuteOfDay;
100
100
  /**
@@ -107,15 +107,15 @@ export interface HoursAndMinutes {
107
107
  /**
108
108
  * Converts the input number of minutes to the equivalent in hours and minutes.
109
109
  *
110
- * @param inputMinutes - Total minutes to convert
111
- * @returns An object with the hour and minute components
110
+ * @param inputMinutes - Total minutes to break down.
111
+ * @returns Split hour-and-minute pair representing the same duration.
112
112
  */
113
113
  export declare function minutesToHoursAndMinutes(inputMinutes: Minutes): HoursAndMinutes;
114
114
  /**
115
115
  * Reads the hour and minutes of the Date in the local timezone.
116
116
  *
117
- * @param date - The date to extract hours and minutes from
118
- * @returns An object with the hour and minute components
117
+ * @param date - Reference instant whose local clock time should be split.
118
+ * @returns Local-time hour-and-minute pair for `date`.
119
119
  */
120
120
  export declare function dateToHoursAndMinutes(date: Date): HoursAndMinutes;
121
121
  /**
@@ -123,7 +123,7 @@ export declare function dateToHoursAndMinutes(date: Date): HoursAndMinutes;
123
123
  *
124
124
  * @param hour - The hour component (0-23)
125
125
  * @param minute - The minute component (0-59)
126
- * @returns The corresponding MinuteOfDay value
126
+ * @returns The corresponding MinuteOfDay value.
127
127
  */
128
128
  export declare function toMinuteOfDay(hour: Hours, minute: Minutes): MinuteOfDay;
129
129
  /**
@@ -131,20 +131,20 @@ export declare function toMinuteOfDay(hour: Hours, minute: Minutes): MinuteOfDay
131
131
  *
132
132
  * @param minuteOfDay - The minute of the day (0-1439)
133
133
  * @param day - Optional base date to use (defaults to the current date)
134
- * @returns A Date with the time set to the specified minute of day
134
+ * @returns Instant at the requested minute-of-day on the supplied calendar day.
135
135
  */
136
136
  export declare function dateFromMinuteOfDay(minuteOfDay: Minutes | MinuteOfDay, day?: Date): Date;
137
137
  /**
138
138
  * Converts a Date to a MinuteOfDay based on the local timezone.
139
139
  *
140
- * @param date - The date to convert
141
- * @returns The MinuteOfDay for the given date
140
+ * @param date - Reference instant whose local clock should be folded into the day.
141
+ * @returns Minute-of-day for `date` in the system timezone.
142
142
  */
143
143
  export declare function dateToMinuteOfDay(date: Date): MinuteOfDay;
144
144
  /**
145
145
  * Converts the input minutes to a valid MinuteOfDay by wrapping around the day boundary.
146
146
  *
147
- * @param minutes - The minutes value to convert
147
+ * @param minutes - The minutes value to convert.
148
148
  * @returns A MinuteOfDay value (0-1439)
149
149
  */
150
150
  export declare function asMinuteOfDay(minutes: Minutes): MinuteOfDay;
@@ -157,7 +157,7 @@ export declare function asMinuteOfDay(minutes: Minutes): MinuteOfDay;
157
157
  * - { hour: 1 } -> "1 hours"
158
158
  * - { minute: 30 } -> "30 minutes"
159
159
  *
160
- * @param input - The hours and minutes to format
161
- * @returns A human-readable string representation
160
+ * @param input - The hours and minutes to format.
161
+ * @returns A human-readable string representation.
162
162
  */
163
163
  export declare function hoursAndMinutesToString(input: HoursAndMinutes): string;
@@ -2,8 +2,8 @@ import { type Milliseconds, type Minutes, type Seconds } from './date';
2
2
  /**
3
3
  * Converts the input number of milliseconds to whole minutes by flooring the result.
4
4
  *
5
- * @param milliseconds - The number of milliseconds to convert.
6
- * @returns The equivalent whole minutes, rounded down.
5
+ * @param milliseconds - Duration to truncate down to whole minutes.
6
+ * @returns Floor of the equivalent minutes count.
7
7
  *
8
8
  * @example
9
9
  * ```ts
@@ -24,14 +24,14 @@ export interface MinutesAndSeconds {
24
24
  *
25
25
  * Rounds down to the nearest second.
26
26
  *
27
- * @param milliseconds - The number of milliseconds to convert
28
- * @returns An object with the minute and second components
27
+ * @param milliseconds - Duration to split into minute + second components.
28
+ * @returns Minute-second pair representing the same duration (seconds floored).
29
29
  */
30
30
  export declare function millisecondsToMinutesAndSeconds(milliseconds: Milliseconds): MinutesAndSeconds;
31
31
  /**
32
32
  * Converts the input number of seconds to the equivalent in minutes and seconds.
33
33
  *
34
- * @param inputSeconds - The number of seconds to convert
35
- * @returns An object with the minute and second components
34
+ * @param inputSeconds - Duration to split into minute + second components.
35
+ * @returns Minute-second pair representing the same duration.
36
36
  */
37
37
  export declare function secondsToMinutesAndSeconds(inputSeconds: Seconds): MinutesAndSeconds;
@@ -24,9 +24,9 @@ export type TimePeriodCounter = (() => number) & {
24
24
  * Returns the number of invocations since the current period started.
25
25
  * When a new period begins, the counter resets to 0.
26
26
  *
27
- * @param timePeriodLength - Length of each time period in milliseconds
28
- * @param lastTimePeriodStart - Optional starting point for the first period
29
- * @returns A callable counter function with metadata properties
27
+ * @param timePeriodLength - Length of each time period in milliseconds.
28
+ * @param lastTimePeriodStart - Optional starting point for the first period.
29
+ * @returns A callable counter function with metadata properties.
30
30
  */
31
31
  export declare function timePeriodCounter(timePeriodLength: number, lastTimePeriodStart?: Maybe<Date>): TimePeriodCounter;
32
32
  export type TimerState = 'running' | 'paused' | 'complete' | 'cancelled';
@@ -104,29 +104,30 @@ export declare class TimerCancelledError extends BaseError {
104
104
  /**
105
105
  * Creates a new Timer from the input duration.
106
106
  *
107
+ * @param duration - The duration of the timer.
108
+ * @param startImmediately - Whether the timer should start immediately. Defaults to true.
109
+ * @returns The new Timer.
110
+ *
107
111
  * @dbxUtil
108
112
  * @dbxUtilCategory date
109
113
  * @dbxUtilKind factory
110
114
  * @dbxUtilTags date, time, timer, factory, duration
111
115
  * @dbxUtilRelated timer
112
116
  *
113
- * @param duration - The duration of the timer.
114
- * @param startImmediately - Whether the timer should start immediately. Defaults to true.
115
- * @returns The new Timer.
116
117
  * @__NO_SIDE_EFFECTS__
117
118
  */
118
119
  export declare function makeTimer(duration: Milliseconds, startImmediately?: boolean): Timer;
119
120
  /**
120
121
  * Toggles the input Timer's running state between running and stopped.
121
122
  *
122
- * @param timer - The timer to toggle
123
+ * @param timer - The timer to toggle.
123
124
  * @param toggleRun - If provided, forces the timer to run (true) or stop (false). Otherwise toggles the current state.
124
125
  */
125
126
  export declare function toggleTimerRunning(timer: Timer, toggleRun?: boolean): void;
126
127
  /**
127
128
  * Returns the approximate end date of the given timer. If a timer is already complete, it returns the time for now.
128
129
  *
129
- * @param timer - the timer whose end date to approximate
130
- * @returns a Date representing the estimated end time, or null if no duration remains
130
+ * @param timer - Timer whose remaining duration anchors the projected end.
131
+ * @returns Projected end instant; null when no duration remains to project.
131
132
  */
132
133
  export declare function approximateTimerEndDate(timer: Timer): Maybe<Date>;
@@ -16,8 +16,8 @@ export type DayOfWeek = Sunday | Monday | Tuesday | Wednesday | Thusrsday | Frid
16
16
  *
17
17
  * Equivalent to date.getDay().
18
18
  *
19
- * @param date - The date to get the day of week for
20
- * @returns The DayOfWeek value (0=Sunday through 6=Saturday)
19
+ * @param date - Reference instant whose local weekday should be reported.
20
+ * @returns Weekday for `date` indexed 0=Sunday through 6=Saturday.
21
21
  */
22
22
  export declare function dayOfWeek(date: Date): DayOfWeek;
23
23
  /**
@@ -27,8 +27,8 @@ export type IsInAllowedDaysOfWeekSetDecisionFunction = IsInSetDecisionFunction<D
27
27
  /**
28
28
  * Creates a DecisionFunction that checks whether the input day or Date falls within the allowed days of the week.
29
29
  *
30
- * @param allowedDaysOfWeek - Set of allowed DayOfWeek values
31
- * @returns A decision function that checks membership in the allowed set
30
+ * @param allowedDaysOfWeek - Set of allowed DayOfWeek values.
31
+ * @returns Reusable predicate that yields true when a date or weekday falls in the allowed set.
32
32
  */
33
33
  export declare function isInAllowedDaysOfWeekSet(allowedDaysOfWeek: Set<DayOfWeek>): IsInAllowedDaysOfWeekSetDecisionFunction;
34
34
  /**
@@ -38,7 +38,7 @@ export declare function isInAllowedDaysOfWeekSet(allowedDaysOfWeek: Set<DayOfWee
38
38
  *
39
39
  * @param startingOn - The day to start from (defaults to Sunday)
40
40
  * @param maxDays - Maximum number of days to return (defaults to 7)
41
- * @returns An array of DayOfWeek values
41
+ * @returns Successive weekdays beginning at `startingOn`, capped at `maxDays`.
42
42
  */
43
43
  export declare function daysOfWeekArray(startingOn?: DayOfWeek, maxDays?: number): DayOfWeek[];
44
44
  /**
@@ -68,15 +68,15 @@ export interface EnabledDays {
68
68
  /**
69
69
  * Creates an EnabledDays object from an iterable of Day enum values.
70
70
  *
71
- * @param input - Iterable of Day values to mark as enabled
72
- * @returns An EnabledDays object with the specified days set to true
71
+ * @param input - Iterable of Day values to mark as enabled.
72
+ * @returns Per-weekday flag record with `true` for every day present in `input`.
73
73
  */
74
74
  export declare function enabledDaysFromDaysOfWeek(input: Maybe<Iterable<Day>>): EnabledDays;
75
75
  /**
76
76
  * Converts an EnabledDays object to an array of Day enum values.
77
77
  *
78
- * @param input - The EnabledDays object to convert
79
- * @returns An array of Day values for all enabled days
78
+ * @param input - Per-weekday flag record specifying which days are enabled.
79
+ * @returns Weekdays whose flag is true, ordered Sunday through Saturday.
80
80
  */
81
81
  export declare function daysOfWeekFromEnabledDays(input: Maybe<EnabledDays>): Day[];
82
82
  /**
@@ -88,27 +88,27 @@ export interface DayOfWeekNamesTransformConfig {
88
88
  *
89
89
  * I.E. Mon, Tue, etc.
90
90
  */
91
- abbreviation?: boolean;
91
+ readonly abbreviation?: boolean;
92
92
  /**
93
93
  * Whether or not to uppercase the days.
94
94
  *
95
95
  * I.E. MONDAY, TUE, etc.
96
96
  */
97
- uppercase?: boolean;
97
+ readonly uppercase?: boolean;
98
98
  }
99
99
  /**
100
100
  * Returns an array of strings with each day of the week named.
101
101
  *
102
- * @param sundayFirst - If true (default), Sunday is the first day; otherwise Monday is first
103
- * @param transform - Optional configuration for abbreviation and casing
104
- * @returns Array of day name strings
102
+ * @param sundayFirst - If true (default), Sunday is the first day; otherwise Monday is first.
103
+ * @param transform - Optional configuration for abbreviation and casing.
104
+ * @returns Localized weekday labels ordered per `sundayFirst` and styled per `transform`.
105
105
  */
106
106
  export declare function getDaysOfWeekNames(sundayFirst?: boolean, transform?: DayOfWeekNamesTransformConfig): string[];
107
107
  /**
108
108
  * Creates a Map from DayOfWeek values to their string names.
109
109
  *
110
- * @param transform - Optional configuration for abbreviation and casing
111
- * @returns A Map from DayOfWeek to name string
110
+ * @param transform - Optional configuration for abbreviation and casing.
111
+ * @returns Lookup pairing each weekday with its formatted name.
112
112
  */
113
113
  export declare function daysOfWeekNameMap(transform?: DayOfWeekNamesTransformConfig): Map<DayOfWeek, string>;
114
114
  /**
@@ -118,52 +118,53 @@ export type DayOfWeekNameFunction = (dayOfWeek: DayOfWeek) => string;
118
118
  /**
119
119
  * Creates a function that returns the name for a given DayOfWeek.
120
120
  *
121
+ * @param transform - Optional configuration for abbreviation and casing.
122
+ * @returns Reusable resolver that maps a weekday to its formatted name (or 'UNKNOWN').
123
+ *
121
124
  * @dbxUtil
122
125
  * @dbxUtilCategory date
123
126
  * @dbxUtilKind factory
124
127
  * @dbxUtilTags date, week, day-of-week, name, factory, format
125
128
  * @dbxUtilRelated days-of-week-name-map
126
129
  *
127
- * @param transform - Optional configuration for abbreviation and casing
128
- * @returns A function that maps DayOfWeek values to name strings
129
130
  * @__NO_SIDE_EFFECTS__
130
131
  */
131
132
  export declare function daysOfWeekNameFunction(transform?: DayOfWeekNamesTransformConfig): DayOfWeekNameFunction;
132
133
  /**
133
134
  * Returns the DayOfWeek for the day after the given day.
134
135
  *
135
- * @param day - The starting day
136
- * @returns The next day of the week
136
+ * @param day - The starting day.
137
+ * @returns The next day of the week.
137
138
  */
138
139
  export declare function getDayTomorrow(day: DayOfWeek): DayOfWeek;
139
140
  /**
140
141
  * Returns the DayOfWeek for the day before the given day.
141
142
  *
142
- * @param day - The starting day
143
- * @returns The previous day of the week
143
+ * @param day - The starting day.
144
+ * @returns The previous day of the week.
144
145
  */
145
146
  export declare function getDayYesterday(day: DayOfWeek): DayOfWeek;
146
147
  /**
147
148
  * Returns the DayOfWeek offset by the given number of days (positive = forward, negative = backward).
148
149
  *
149
- * @param day - The starting day
150
- * @param days - The number of days to offset (positive or negative)
151
- * @returns The resulting DayOfWeek
150
+ * @param day - Starting weekday from which to offset.
151
+ * @param days - Signed step count (positive advances; negative rewinds).
152
+ * @returns Weekday after applying the signed offset, wrapping at week boundaries.
152
153
  */
153
154
  export declare function getDayOffset(day: DayOfWeek, days: number): DayOfWeek;
154
155
  /**
155
156
  * Returns the DayOfWeek that is the given number of days before the input day.
156
157
  *
157
- * @param day - The starting day
158
- * @param days - The number of days to go back (defaults to 1)
159
- * @returns The resulting DayOfWeek
158
+ * @param day - Starting weekday from which to rewind.
159
+ * @param days - Step count to walk backwards; defaults to 1.
160
+ * @returns Weekday `days` positions earlier, wrapping at week boundaries.
160
161
  */
161
162
  export declare function getPreviousDay(day: DayOfWeek, days?: number): DayOfWeek;
162
163
  /**
163
164
  * Returns the DayOfWeek that is the given number of days after the input day.
164
165
  *
165
- * @param day - The starting day
166
- * @param days - The number of days to advance (defaults to 1)
167
- * @returns The resulting DayOfWeek
166
+ * @param day - Starting weekday from which to advance.
167
+ * @param days - Step count to walk forwards; defaults to 1.
168
+ * @returns Weekday `days` positions later, wrapping at week boundaries.
168
169
  */
169
170
  export declare function getNextDay(day: DayOfWeek, days?: number): DayOfWeek;
@@ -95,6 +95,9 @@ export interface SelectiveFieldEncryptor<T, F extends keyof T> {
95
95
  * Each encrypted field's value is JSON.stringified before encryption and JSON.parsed after
96
96
  * decryption, so fields can hold any JSON-serializable value (not just strings).
97
97
  *
98
+ * @param config - Encryption configuration specifying provider, fields, and optional prefix.
99
+ * @returns A selective field encryptor instance.
100
+ *
98
101
  * @example
99
102
  * ```ts
100
103
  * const encryptor = selectiveFieldEncryptor({
@@ -108,8 +111,5 @@ export interface SelectiveFieldEncryptor<T, F extends keyof T> {
108
111
  * const decrypted = encryptor.decrypt(encrypted);
109
112
  * // decrypted => { client_id: 'abc', client_secret: 's3cret' }
110
113
  * ```
111
- *
112
- * @param config - Encryption configuration specifying provider, fields, and optional prefix.
113
- * @returns A selective field encryptor instance.
114
114
  */
115
115
  export declare function selectiveFieldEncryptor<T extends object, F extends keyof T>(config: SelectiveFieldEncryptionConfig<T, F>): SelectiveFieldEncryptor<T, F>;
@@ -34,8 +34,8 @@ export interface ReadableError extends Partial<CodedError> {
34
34
  /**
35
35
  * Checks if the error has the default error code or no code at all.
36
36
  *
37
- * @param error - A ReadableError or error code string to check
38
- * @returns True if the error uses the default code or has no code
37
+ * @param error - A ReadableError or error code string to check.
38
+ * @returns True if the error uses the default code or has no code.
39
39
  */
40
40
  export declare function isDefaultReadableError(error: Maybe<ReadableError | StringErrorCode>): boolean;
41
41
  /**
@@ -45,9 +45,9 @@ export type ReadableErrorWithCode<T extends ReadableError = ReadableError> = T &
45
45
  /**
46
46
  * Creates a ReadableError with a code and optional message.
47
47
  *
48
- * @param code - The error code
49
- * @param message - Optional human-readable error message
50
- * @returns A ReadableErrorWithCode object
48
+ * @param code - The error code.
49
+ * @param message - Optional human-readable error message.
50
+ * @returns A ReadableErrorWithCode object.
51
51
  */
52
52
  export declare function readableError(code: StringErrorCode, message?: string): ReadableErrorWithCode;
53
53
  /**
@@ -78,9 +78,9 @@ export declare function toReadableError(inputError: Maybe<ErrorInput>): Maybe<Co
78
78
  /**
79
79
  * Checks if an error's message contains the target string.
80
80
  *
81
- * @param input - The error or string to check
82
- * @param target - The string to search for in the error message
83
- * @returns True if the error message contains the target string
81
+ * @param input - Error-shaped value or message string to inspect; nullish short-circuits to false.
82
+ * @param target - Substring that must appear in the resolved error message.
83
+ * @returns True when the error message includes `target`.
84
84
  */
85
85
  export declare function errorMessageContainsString(input: Maybe<ErrorInput | string>, target: string): boolean;
86
86
  /**
@@ -90,21 +90,22 @@ export type ErrorMessageContainsStringFunction = (input: Maybe<ErrorInput | stri
90
90
  /**
91
91
  * Creates a function that checks if an error's message contains the target string.
92
92
  *
93
+ * @param target - Substring that must appear in the resolved error message.
94
+ * @returns Reusable predicate that yields true when the inspected error contains `target`.
95
+ *
93
96
  * @dbxUtil
94
97
  * @dbxUtilCategory error
95
98
  * @dbxUtilKind factory
96
99
  * @dbxUtilTags error, message, contains, factory, predicate, regex
97
100
  * @dbxUtilRelated escape-string-for-regex
98
101
  *
99
- * @param target - The string to search for
100
- * @returns A function that checks error messages for the target string
101
102
  * @__NO_SIDE_EFFECTS__
102
103
  */
103
104
  export declare function errorMessageContainsStringFunction(target: string): ErrorMessageContainsStringFunction;
104
105
  /**
105
106
  * Extracts the message string from an error or returns the input if it's already a string.
106
107
  *
107
- * @param input - The error or string to extract a message from
108
- * @returns The error message string, or null/undefined if not available
108
+ * @param input - The error or string to extract a message from.
109
+ * @returns The error message string, or null/undefined if not available.
109
110
  */
110
111
  export declare function messageFromError(input: Maybe<ErrorInput | string>): Maybe<string>;
@@ -13,8 +13,8 @@ export interface ServerError<T = ServerErrorResponseData> extends ReadableDataEr
13
13
  /**
14
14
  * Type guard that checks if the input is a ServerError (has both status and code properties).
15
15
  *
16
- * @param input - The value to check
17
- * @returns True if the input is a ServerError
16
+ * @param input - The value to check.
17
+ * @returns True if the input is a ServerError.
18
18
  */
19
19
  export declare function isServerError(input: unknown): input is ServerError;
20
20
  /**
@@ -40,8 +40,8 @@ export interface ServerErrorMakeConfig<T> extends ServerError<T>, Partial<CodedE
40
40
  /**
41
41
  * Creates a ServerError from the given configuration.
42
42
  *
43
- * @param config - The server error configuration
44
- * @returns A ServerError object
43
+ * @param config - The server error configuration.
44
+ * @returns A ServerError object.
45
45
  */
46
46
  export declare function serverError<T>(config: ServerErrorMakeConfig<T>): ServerError<T>;
47
47
  /**
@@ -31,7 +31,7 @@ export declare const PDF_ENCRYPT_MARKER = "/Encrypt";
31
31
  * the expected start/end markers are present.
32
32
  *
33
33
  * @param buffer - Buffer-like object to check. Only requires the `lastIndexOf` method.
34
- * @returns true if both PDF markers are found in the expected positions.
34
+ * @returns True if both PDF markers are found in the expected positions.
35
35
  */
36
36
  export declare function bufferHasValidPdfMarkings(buffer: Pick<Buffer<ArrayBuffer>, 'lastIndexOf' | 'includes'>): boolean;
37
37
  /**
@@ -48,6 +48,9 @@ export declare function bufferHasValidPdfMarkings(buffer: Pick<Buffer<ArrayBuffe
48
48
  * Note: this returns true for both fully-encrypted PDFs and write-protected-only PDFs.
49
49
  * Use `detectPdfEncryption` from `@dereekb/nestjs` when that distinction matters.
50
50
  *
51
+ * @param buffer - Buffer-like object to check. Only requires the `includes` method.
52
+ * @returns True if the buffer contains a `/Encrypt` entry indicating password protection.
53
+ *
51
54
  * @example
52
55
  * ```ts
53
56
  * const pdfBytes = await readFile('protected.pdf');
@@ -57,8 +60,5 @@ export declare function bufferHasValidPdfMarkings(buffer: Pick<Buffer<ArrayBuffe
57
60
  * throw new Error('Password-protected PDFs are not supported.');
58
61
  * }
59
62
  * ```
60
- *
61
- * @param buffer - Buffer-like object to check. Only requires the `includes` method.
62
- * @returns true if the buffer contains a `/Encrypt` entry indicating password protection.
63
63
  */
64
64
  export declare function isPdfPasswordProtected(buffer: Pick<Buffer<ArrayBuffer>, 'includes'>): boolean;
@@ -18,14 +18,15 @@ export type FilterFunction<T = unknown> = (value: T, index: number) => boolean;
18
18
  * The merged function returns true only if all individual filters pass (AND logic).
19
19
  * Null/undefined filters are ignored.
20
20
  *
21
+ * @param inputFilters - The filter functions to merge.
22
+ * @returns A single FilterFunction that applies all filters.
23
+ *
21
24
  * @dbxUtil
22
25
  * @dbxUtilCategory value
23
26
  * @dbxUtilKind factory
24
27
  * @dbxUtilTags filter, merge, compose, factory, and
25
28
  * @dbxUtilRelated invert-filter, invert-boolean-return-function
26
29
  *
27
- * @param inputFilters - The filter functions to merge
28
- * @returns A single FilterFunction that applies all filters
29
30
  * @__NO_SIDE_EFFECTS__
30
31
  */
31
32
  export declare function mergeFilterFunctions<T>(...inputFilters: Maybe<FilterFunction<T>>[]): FilterFunction<T>;
@@ -5,15 +5,16 @@ export type BooleanReturnFunction = (...args: any[]) => boolean;
5
5
  /**
6
6
  * Inverts the output of an arbitrary boolean-returning function.
7
7
  *
8
+ * @param decisionFn - The function whose boolean return value to invert.
9
+ * @param invert - Whether to apply the inversion (defaults to true)
10
+ * @returns The inverted function, or the original if invert is false.
11
+ *
8
12
  * @dbxUtil
9
13
  * @dbxUtilCategory function
10
14
  * @dbxUtilKind factory
11
15
  * @dbxUtilTags function, boolean, invert, predicate, factory
12
16
  * @dbxUtilRelated decision-function, filter-function
13
17
  *
14
- * @param decisionFn - The function whose boolean return value to invert
15
- * @param invert - Whether to apply the inversion (defaults to true)
16
- * @returns The inverted function, or the original if invert is false
17
18
  * @__NO_SIDE_EFFECTS__
18
19
  */
19
20
  export declare function invertBooleanReturnFunction<F extends BooleanReturnFunction>(decisionFn: F, invert?: boolean): F;
@@ -10,14 +10,15 @@ export type ForwardFunction<I extends (...args: any[]) => O, O = unknown> = I;
10
10
  *
11
11
  * Useful for late-binding or circular dependency resolution.
12
12
  *
13
+ * @param getter - A Getter that provides the target function.
14
+ * @returns A forwarding function with the same signature as the target.
15
+ *
13
16
  * @dbxUtil
14
17
  * @dbxUtilCategory function
15
18
  * @dbxUtilKind factory
16
19
  * @dbxUtilTags function, forward, late-binding, factory, lazy
17
20
  * @dbxUtilRelated default-forward-function-factory
18
21
  *
19
- * @param getter - A Getter that provides the target function
20
- * @returns A forwarding function with the same signature as the target
21
22
  * @__NO_SIDE_EFFECTS__
22
23
  */
23
24
  export declare function forwardFunction<I extends (...args: any[]) => O, O = unknown>(getter: Getter<I>): ForwardFunction<I>;
@@ -29,14 +30,15 @@ export type DefaultForwardFunctionFactory<I extends (...args: any[]) => O, O = u
29
30
  * Creates a factory that produces forwarding functions which use the provided function
30
31
  * or fall back to the default function when not provided.
31
32
  *
33
+ * @param defaultFn - The default function to use as fallback.
34
+ * @returns A factory that wraps optional functions with a default fallback.
35
+ *
32
36
  * @dbxUtil
33
37
  * @dbxUtilCategory function
34
38
  * @dbxUtilKind factory
35
39
  * @dbxUtilTags function, forward, factory, default, fallback
36
40
  * @dbxUtilRelated forward-function
37
41
  *
38
- * @param defaultFn - The default function to use as fallback
39
- * @returns A factory that wraps optional functions with a default fallback
40
42
  * @__NO_SIDE_EFFECTS__
41
43
  */
42
44
  export declare function defaultForwardFunctionFactory<I extends (...args: any[]) => O, O = unknown>(defaultFn: I): DefaultForwardFunctionFactory<I, O>;