@fgv/ts-utils 1.2.0-alpha.2 → 1.3.0

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 (77) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +4 -0
  3. package/brand.d.ts +2 -0
  4. package/brand.d.ts.map +1 -0
  5. package/brand.js +1 -1
  6. package/converter.d.ts +185 -73
  7. package/converter.d.ts.map +1 -0
  8. package/converter.js +104 -51
  9. package/converters.d.ts +440 -182
  10. package/converters.d.ts.map +1 -0
  11. package/converters.js +358 -209
  12. package/csvHelpers.d.ts +7 -0
  13. package/csvHelpers.d.ts.map +1 -0
  14. package/csvHelpers.js +14 -4
  15. package/extendedArray.d.ts +46 -0
  16. package/extendedArray.d.ts.map +1 -0
  17. package/extendedArray.js +53 -8
  18. package/formatter.d.ts +53 -0
  19. package/formatter.d.ts.map +1 -0
  20. package/formatter.js +27 -4
  21. package/hash.d.ts +51 -0
  22. package/hash.d.ts.map +1 -0
  23. package/hash.js +168 -0
  24. package/index.d.ts +6 -2
  25. package/index.d.ts.map +1 -0
  26. package/index.js +15 -5
  27. package/logger.d.ts +3 -2
  28. package/logger.d.ts.map +1 -0
  29. package/logger.js +12 -12
  30. package/package.json +24 -20
  31. package/rangeOf.d.ts +96 -0
  32. package/rangeOf.d.ts.map +1 -0
  33. package/rangeOf.js +81 -2
  34. package/result.d.ts +391 -39
  35. package/result.d.ts.map +1 -0
  36. package/result.js +257 -49
  37. package/ts-utils.d.ts +2451 -0
  38. package/tsdoc-metadata.json +11 -0
  39. package/utils.d.ts +49 -27
  40. package/utils.d.ts.map +1 -0
  41. package/utils.js +53 -36
  42. package/validation/boolean.d.ts +27 -0
  43. package/validation/boolean.d.ts.map +1 -0
  44. package/validation/boolean.js +59 -0
  45. package/validation/classes.d.ts +5 -1
  46. package/validation/classes.d.ts.map +1 -0
  47. package/validation/classes.js +9 -2
  48. package/validation/field.d.ts +30 -0
  49. package/validation/field.d.ts.map +1 -0
  50. package/validation/field.js +23 -5
  51. package/validation/genericValidator.d.ts +41 -22
  52. package/validation/genericValidator.d.ts.map +1 -0
  53. package/validation/genericValidator.js +25 -26
  54. package/validation/index.d.ts +5 -3
  55. package/validation/index.d.ts.map +1 -0
  56. package/validation/index.js +15 -8
  57. package/validation/number.d.ts +20 -0
  58. package/validation/number.d.ts.map +1 -0
  59. package/validation/number.js +17 -2
  60. package/validation/object.d.ts +76 -11
  61. package/validation/object.d.ts.map +1 -0
  62. package/validation/object.js +52 -14
  63. package/validation/string.d.ts +20 -0
  64. package/validation/string.d.ts.map +1 -0
  65. package/validation/string.js +17 -2
  66. package/validation/traits.d.ts +50 -1
  67. package/validation/traits.d.ts.map +1 -0
  68. package/validation/traits.js +15 -2
  69. package/validation/validator.d.ts +44 -23
  70. package/validation/validator.d.ts.map +1 -0
  71. package/validation/validator.js +1 -1
  72. package/validation/validatorBase.d.ts +16 -1
  73. package/validation/validatorBase.d.ts.map +1 -0
  74. package/validation/validatorBase.js +7 -1
  75. package/validation/validators.d.ts +26 -2
  76. package/validation/validators.d.ts.map +1 -0
  77. package/validation/validators.js +26 -8
package/converters.d.ts CHANGED
@@ -4,7 +4,9 @@ import { Result } from './result';
4
4
  import { ExtendedArray } from './extendedArray';
5
5
  declare type OnError = 'failOnError' | 'ignoreErrors';
6
6
  /**
7
- * Options for @see StringConverter maching method
7
+ * Options for {@link Converters.StringConverter | StringConverter}
8
+ * matching method
9
+ * @public
8
10
  */
9
11
  export interface StringMatchOptions {
10
12
  /**
@@ -14,255 +16,392 @@ export interface StringMatchOptions {
14
16
  message?: string;
15
17
  }
16
18
  /**
17
- * The @see StringConverter class extends @see BaseConverter to provide string-specific helper
18
- * functions.
19
+ * The {@link Converters.StringConverter | StringConverter} class extends {@link BaseConverter}
20
+ * to provide string-specific helper methods.
21
+ * @public
19
22
  */
20
23
  export declare class StringConverter<T extends string = string, TC = unknown> extends BaseConverter<T, TC> {
21
24
  /**
22
- * Construct a new @see StringConverter
23
- * @param defaultContext Optional context used by the conversion
24
- * @param traits Optional traits to be applied to the conversion
25
- * @param converter Optional converter to be used for the conversion
25
+ * Construct a new {@link Converters.StringConverter | StringConverter}.
26
+ * @param defaultContext - Optional context used by the conversion.
27
+ * @param traits - Optional traits to be applied to the conversion.
28
+ * @param converter - Optional conversion function to be used for the conversion.
26
29
  */
27
30
  constructor(defaultContext?: TC, traits?: ConverterTraits, converter?: (from: unknown, self: Converter<T, TC>, context?: TC) => Result<T>);
31
+ /**
32
+ * @internal
33
+ */
28
34
  protected static _convert<T extends string>(from: unknown): Result<T>;
35
+ /**
36
+ * @internal
37
+ */
29
38
  protected static _wrap<T extends string, TC>(wrapped: StringConverter<T, TC>, converter: (from: T) => Result<T>, traits?: ConverterTraits): StringConverter<T, TC>;
30
39
  /**
31
- * Returns a @see StringConverter which constrains the result to match a supplied
32
- * string.
33
- * @param match The string to be matched
34
- * @param options Optional @see StringMatchOptions for this conversion
35
- * @returns @see Success with a matching string or @see Failure with an informative
40
+ * Returns a {@link Converters.StringConverter | StringConverter} which constrains the result to match
41
+ * a supplied string.
42
+ * @param match - The string to be matched
43
+ * @param options - Optional {@link Converters.StringMatchOptions} for this conversion.
44
+ * @returns {@link Success} with a matching string or {@link Failure} with an informative
36
45
  * error if the string does not match.
46
+ * {@label string}
37
47
  */
38
48
  matching(match: string, options?: Partial<StringMatchOptions>): StringConverter<T, TC>;
39
49
  /**
40
- * Returns a @see StringConverter which constrains the result to match one of a supplied
41
- * array of strings.
42
- * @param match The array to be searched
43
- * @param options Optional @see StringMatchOptions for this conversion
44
- * @returns @see Success with a matching string or @see Failure with an informative
50
+ * Returns a {@link Converters.StringConverter | StringConverter} which constrains the result to match
51
+ * one of a supplied array of strings.
52
+ * @param match - The array of allowed strings.
53
+ * @param options - Optional {@link Converters.StringMatchOptions} for this conversion.
54
+ * @returns {@link Success} with a matching string or {@link Failure} with an informative
45
55
  * error if the string does not match.
56
+ * {@label array}
46
57
  */
47
58
  matching(match: string[], options?: Partial<StringMatchOptions>): StringConverter<T, TC>;
48
59
  /**
49
- * Returns a @see StringConverter which constrains the result to match one of a supplied
50
- * Set of strings.
51
- * @param match The Set to be tested
52
- * @param options Optional @see StringMatchOptions for this conversion
53
- * @returns @see Success with a matching string or @see Failure with an informative
60
+ * Returns a {@link Converters.StringConverter | StringConverter} which constrains the result to match
61
+ * one of a supplied `Set` of strings.
62
+ * @param match - The `Set` of allowed strings.
63
+ * @param options - Optional {@link Converters.StringMatchOptions} for this conversion.
64
+ * @returns {@link Success} with a matching string or {@link Failure} with an informative
54
65
  * error if the string does not match.
66
+ * {@label set}
55
67
  */
56
68
  matching(match: Set<T>, options?: Partial<StringMatchOptions>): StringConverter<T, TC>;
57
69
  /**
58
- * Returns a @see StringConverter which constrains the result to match a supplied regular
59
- * expression.
60
- * @param match The @see RegExp to be tested
61
- * @param options Optional @see StringMatchOptions for this conversion
62
- * @returns @see Success with a matching string or @see Failure with an informative
70
+ * Returns a {@link Converters.StringConverter | StringConverter} which constrains the result to match
71
+ * a supplied regular expression.
72
+ * @param match - The regular expression to be used as a constraint.
73
+ * @param options - Optional {@link Converters.StringMatchOptions} for this conversion
74
+ * @returns {@link Success} with a matching string or {@link Failure} with an informative
63
75
  * error if the string does not match.
76
+ * {@label regexp}
64
77
  */
65
78
  matching(match: RegExp, options?: Partial<StringMatchOptions>): StringConverter<T, TC>;
66
79
  }
67
80
  /**
68
81
  * A converter to convert unknown to string. Values of type
69
82
  * string succeed. Anything else fails.
83
+ * @public
70
84
  */
71
85
  export declare const string: StringConverter<string, unknown>;
72
86
  /**
73
- * Helper function to create a converter which converts unknown to string, applying
74
- * template conversions supplied at construction time or at runtime as context.
75
- * @param defaultContext optional default context to use for template values
87
+ * Helper function to create a {@link Converters.StringConverter | StringConverter} which converts
88
+ * `unknown` to `string`, applying template conversions supplied at construction time or at
89
+ * runtime as context.
90
+ * @remarks
91
+ * Template conversions are applied using `mustache` syntax.
92
+ * @param defaultContext - Optional default context to use for template values.
93
+ * @returns A new {@link Converter} returning `string`.
94
+ * @public
76
95
  */
77
96
  export declare function templateString(defaultContext?: unknown): StringConverter<string, unknown>;
78
97
  /**
79
- * A converter to convert unknown to one of a set of supplied enumerated values. Anything else fails.
98
+ * Helper function to create a {@link Converter} which converts `unknown` to one of a set of supplied
99
+ * enumerated values. Anything else fails.
100
+ *
101
+ * @remarks
80
102
  * Allowed enumerated values can also be supplied as context at conversion time.
81
- * @param values Array of allowed values
103
+ * @param values - Array of allowed values.
104
+ * @returns A new {@link Converter} returning `<T>`.
105
+ * @public
82
106
  */
83
107
  export declare function enumeratedValue<T>(values: T[]): Converter<T, T[]>;
84
108
  /**
85
- * A converter to convert unknown to some value. Succeeds with the supplied value if an identity
86
- * comparison succeeds, fails otherwise.
87
- * @param value The value to be compared
109
+ * Helper function to create a {@link Converter} which converts `unknown` to one of a set of supplied enumerated
110
+ * values, mapping any of multiple supplied values to the enumeration.
111
+ * @remarks
112
+ * Enables mapping of multiple input values to a consistent internal representation (so e.g. `'y'`, `'yes'`,
113
+ * `'true'`, `1` and `true` can all map to boolean `true`)
114
+ * @param map - An array of tuples describing the mapping. The first element of each tuple is the result
115
+ * value, the second is the set of values that map to the result. Tuples are evaluated in the order
116
+ * supplied and are not checked for duplicates.
117
+ * @param message - An optional error message.
118
+ * @returns A {@link Converter} which applies the mapping and yields `<T>` on success.
119
+ * @public
120
+ */
121
+ export declare function mappedEnumeratedValue<T>(map: [T, unknown[]][], message?: string): Converter<T, undefined>;
122
+ /**
123
+ * Helper function to create a {@link Converter} which converts `unknown` to some supplied literal value. Succeeds with
124
+ * the supplied value if an identity comparison succeeds, fails otherwise.
125
+ * @param value - The value to be compared.
126
+ * @returns A {@link Converter} which returns the supplied value on success.
127
+ * @public
88
128
  */
89
129
  export declare function literal<T>(value: T): Converter<T, unknown>;
90
130
  /**
91
131
  * Deprecated alias for @see literal
92
- * @param value The value to be compared
93
- * @deprecated use literal instead
132
+ * @param value - The value to be compared.
133
+ * @deprecated Use {@link Converters.literal} instead.
134
+ * @internal
94
135
  */
95
136
  export declare const value: typeof literal;
96
137
  /**
97
- * A converter to convert unknown to a number. Numbers and strings
98
- * with a numeric format succeed. Anything else fails.
138
+ * A {@link Converter} which converts `unknown` to a `number`.
139
+ * @remarks
140
+ * Numbers and strings with a numeric format succeed. Anything else fails.
141
+ * @public
99
142
  */
100
143
  export declare const number: BaseConverter<number, undefined>;
101
144
  /**
102
- * A converter to convert unknown to boolean. Boolean values or the
103
- * case-insensitive strings 'true' and 'false' succeed. Anything
104
- * else fails.
145
+ * A {@link Converter} which converts `unknown` to `boolean`.
146
+ * @remarks
147
+ * Boolean values or the case-insensitive strings `'true'` and `'false'` succeed.
148
+ * Anything else fails.
149
+ * @public
105
150
  */
106
151
  export declare const boolean: BaseConverter<boolean, undefined>;
107
152
  /**
108
- * A converter to convert an optional string value. Values of type string
109
- * are returned. Anything else returns success with an undefined value.
153
+ * A {@link Converter} which converts an optional `string` value. Values of type
154
+ * `string` are returned. Anything else returns {@link Success} with value `undefined`.
155
+ * @public
110
156
  */
111
157
  export declare const optionalString: Converter<string | undefined, unknown>;
112
158
  /**
113
- * Creates a converter which converts any string into an array of strings
114
- * by separating at a supplied delimiter. Delimeter may also be supplied
115
- * as context at conversion time.
116
- * @param delimiter The delimiter at which to split.
159
+ * Helper function to create a {@link Converter} which converts any `string` into an
160
+ * array of `string`, by separating at a supplied delimiter.
161
+ * @remarks
162
+ * Delimeter may also be supplied as context at conversion time.
163
+ * @param delimiter - The delimiter at which to split.
164
+ * @returns A new {@link Converter} returning `string[]`.
165
+ * @public
117
166
  */
118
167
  export declare function delimitedString(delimiter: string, options?: 'filtered' | 'all'): Converter<string[], string>;
119
168
  /**
120
- * A converter to convert an iso formatted string, a number or a Date object to a Date object
169
+ * A {@link Converter} which converts an iso formatted string, a number or a `Date` object to
170
+ * a `Date` object.
171
+ * @public
121
172
  */
122
173
  export declare const isoDate: BaseConverter<Date, undefined>;
123
174
  /**
124
- * A converter to convert an optional number value. Values of type number
125
- * or numeric strings are converted and returned. Anything else returns
126
- * success with an undefined value.
175
+ * A {@link Converter} which converts an optional `number` value.
176
+ * @remarks
177
+ * Values of type `number` or numeric strings are converted and returned.
178
+ * Anything else returns {@link Success} with value `undefined`.
179
+ * @public
127
180
  */
128
181
  export declare const optionalNumber: Converter<number | undefined, undefined>;
129
182
  /**
130
- * A converter to convert an optional boolean value. Values of type boolean
131
- * or strings that match (case-insensitive) 'true' or 'false' are converted
132
- * and returned. Anything else returns success with an undefined value.
183
+ * A {@link Converter} to convert an optional `boolean` value.
184
+ * @remarks
185
+ * Values of type `boolean` or strings that match (case-insensitive) `'true'`
186
+ * or `'false'` are converted and returned. Anything else returns {@link Success}
187
+ * with value `undefined`.
188
+ * @public
133
189
  */
134
190
  export declare const optionalBoolean: Converter<boolean | undefined, undefined>;
135
191
  /**
136
- * A helper wrapper for polymorphic fields. Invokes the wrapped converters
137
- * in sequence, returning the first successful result. Returns an error
138
- * if none of the supplied converters can convert the value.
139
- *
140
- * If onError is 'ignoreErrors' (default), then errors from any of the
192
+ * A helper function to create a {@link Converter} for polymorphic values. Returns a
193
+ * converter which Invokes the wrapped converters in sequence, returning the first successful
194
+ * result. Returns an error if none of the supplied converters can convert the value.
195
+ * @remarks
196
+ * If `onError` is `ignoreErrors` (default), then errors from any of the
141
197
  * converters are ignored provided that some converter succeeds. If
142
- * onError is 'failOnError', then an error from any converter fails the entire
198
+ * onError is `failOnError`, then an error from any converter fails the entire
143
199
  * conversion.
144
200
  *
145
- * @param converters An ordered list of converters to be considered
146
- * @param onError Specifies treatment of unconvertable elements
201
+ * @param converters - An ordered list of {@link Converter | converters} to be considered.
202
+ * @param onError - Specifies treatment of unconvertable elements.
203
+ * @returns A new {@link Converter} which yields a value from the union of the types returned
204
+ * by the wrapped converters.
205
+ * @public
147
206
  */
148
207
  export declare function oneOf<T, TC = unknown>(converters: Array<Converter<T, TC>>, onError?: OnError): Converter<T, TC>;
149
208
  /**
150
- * A helper wrapper for converting an array of <T>. If onError is 'failOnError' (default),
151
- * then the entire conversion fails if any element cannot be converted. If onError
152
- * is 'ignoreErrors', failing elements are silently ignored.
153
- * @param converter Converter used to convert each item in the array
154
- * @param ignoreErrors Specifies treatment of unconvertable elements
209
+ * A helper function to create a {@link Converter} which converts `unknown` to an array of `<T>`.
210
+ * @remarks
211
+ * If `onError` is `'failOnError'` (default), then the entire conversion fails if any element cannot
212
+ * be converted. If `onError` is `'ignoreErrors'`, then failing elements are silently ignored.
213
+ * @param converter - {@link Converter} used to convert each item in the array.
214
+ * @param ignoreErrors - Specifies treatment of unconvertable elements.
215
+ * @returns A {@link Converter} which returns an array of `<T>`.
216
+ * @public
155
217
  */
156
218
  export declare function arrayOf<T, TC = undefined>(converter: Converter<T, TC>, onError?: OnError): Converter<T[], TC>;
157
219
  /**
158
- * A helper wrapper for converting to Itemrray<T>. If onError is 'failOnError' (default),
159
- * then the entire conversion fails if any element cannot be converted. If onError
160
- * is 'ignoreErrors', failing elements are silently ignored.
161
- * @param converter Converter used to convert each item in the array
162
- * @param ignoreErrors Specifies treatment of unconvertable elements
220
+ * A helper function to create a {@link Converter} which converts `unknown` to {@link ExtendedArray | ExtendedArray<T>}.
221
+ * @remarks
222
+ * If `onError` is `'failOnError'` (default), then the entire conversion fails if any element cannot
223
+ * be converted. If `onError` is `'ignoreErrors'`, then failing elements are silently ignored.
224
+ * @param converter - {@link Converter} used to convert each item in the array
225
+ * @param ignoreErrors - Specifies treatment of unconvertable elements
226
+ * @beta
163
227
  */
164
228
  export declare function extendedArrayOf<T, TC = undefined>(label: string, converter: Converter<T, TC>, onError?: OnError): Converter<ExtendedArray<T>, TC>;
165
229
  /**
166
- * Converter to convert an unknown to an array of strings. Conversion succeeds
167
- * and returns the supplied value if it as an array of strings, fails otherwise.
230
+ * {@link Converter} to convert an `unknown` to an array of `string`.
231
+ * @remarks
232
+ * Returns {@link Success} with the the supplied value if it as an array
233
+ * of strings, returns {@link Failure} with an error message otherwise.
234
+ * @public
168
235
  */
169
236
  export declare const stringArray: Converter<string[], unknown>;
170
237
  /**
171
- * Converter to convert an unknown to an array of numbers. Conversion succeeds
172
- * and returns the supplied value if it as an array of numbers, fails otherwise.
238
+ * {@link Converter} to convert an `unknown` to an array of `number`.
239
+ * @remarks
240
+ * Returns {@link Success} with the the supplied value if it as an array
241
+ * of numbers, returns {@link Failure} with an error message otherwise.
242
+ * @public
173
243
  */
174
244
  export declare const numberArray: Converter<number[], undefined>;
175
245
  /**
176
- * Options for 'recordOf' and 'mapOf' converters
246
+ * Options for {@link Converters.(recordOf:withOptions)} and {@link Converters.(mapOf:withOptions)}
247
+ * helper functions.
248
+ * @public
177
249
  */
178
250
  export interface KeyedConverterOptions<T extends string = string, TC = undefined> {
251
+ /**
252
+ * if `onError` is `'fail'` (default), then the entire conversion fails if any key or element
253
+ * cannot be converted. If `onError` is `'ignore'`, failing elements are silently ignored.
254
+ */
179
255
  onError?: 'fail' | 'ignore';
256
+ /**
257
+ * If present, `keyConverter` is used to convert the source object property names to
258
+ * keys in the resulting map or record.
259
+ * @remarks
260
+ * Can be used to coerce key names to supported values and/or strong types.
261
+ */
180
262
  keyConverter?: Converter<T, TC>;
181
263
  }
182
264
  /**
183
- * A helper wrapper to convert the string-keyed properties of an object to a Record of T.
184
- * Conversion fails if any element cannot be converted. If onError is 'ignore' failing
185
- * elements are silently ignored.
186
- * @param converter Converter used to convert each item in the record
265
+ * A helper function to create a {@link Converter} which converts the `string`-keyed properties
266
+ * using a supplied {@link Converter | Converter<T>} to produce a `Record<string, T>`.
267
+ * @remarks
268
+ * The resulting converter fails conversion if any element cannot be converted.
269
+ * @param converter - {@link Converter} used to convert each item in the source object.
270
+ * @returns A {@link Converter} which returns `Record<string, T>`.
271
+ * {@label default}
272
+ * @public
187
273
  */
188
274
  export declare function recordOf<T, TC = undefined, TK extends string = string>(converter: Converter<T, TC>): Converter<Record<TK, T>, TC>;
189
275
  /**
190
- * A helper wrapper to convert the string-keyed properties of an object to a Record of T.
191
- * If onError is 'fail' (default), then the entire conversion fails if any element
192
- * cannot be converted. If onError is 'ignore' failing elements are silently ignored.
193
- * @param converter Converter used to convert each item in the record
194
- * @param onError Specifies treatment of unconvertable elements
276
+ * A helper function to create a {@link Converter} which converts the `string`-keyed properties
277
+ * using a supplied {@link Converter | Converter<T>} to produce a `Record<string, T>` and optionally
278
+ * specified handling of elements that cannot be converted.
279
+ * @remarks
280
+ * if `onError` is `'fail'` (default), then the entire conversion fails if any key or element
281
+ * cannot be converted. If `onError` is `'ignore'`, failing elements are silently ignored.
282
+ * @param converter - {@link Converter} used to convert each item in the source object.
283
+ * @returns A {@link Converter} which returns `Record<string, T>`.
284
+ * {@label withOnError}
285
+ * @public
195
286
  */
196
287
  export declare function recordOf<T, TC = undefined, TK extends string = string>(converter: Converter<T, TC>, onError: 'fail' | 'ignore'): Converter<Record<TK, T>, TC>;
197
288
  /**
198
- * A helper wrapper to convert the string-keyed properties of an object to a Record of T.
199
- * If options specify a key converter it will be applied to each key.
200
- * If onError is 'fail' (default), then the entire conversion fails if any key or element
201
- * cannot be converted. If onError is 'ignore' failing elements are silently ignored.
202
- * @param converter Converter used to convert each item in the record
203
- * @param options Optional @see KeyedConverterOptions
289
+ * A helper function to create a {@link Converter} which converts the `string`-keyed properties
290
+ * using a supplied {@link Converter | Converter<T>} to produce a `Record<TK, T>`.
291
+ * @remarks
292
+ * If present, the supplied {@link Converters.KeyedConverterOptions | options} can provide a strongly-typed
293
+ * converter for keys and/or control the handling of elements that fail conversion.
294
+ * @param converter - {@link Converter} used to convert each item in the source object.
295
+ * @param options - Optional {@link Converters.KeyedConverterOptions | KeyedConverterOptions<TK, TC>} which
296
+ * supplies a key converter and/or error-handling options.
297
+ * @returns A {@link Converter} which returns `Record<TK, T>`.
298
+ * {@label withOptions}
299
+ * @public
204
300
  */
205
301
  export declare function recordOf<T, TC = undefined, TK extends string = string>(converter: Converter<T, TC>, options: KeyedConverterOptions<TK, TC>): Converter<Record<TK, T>, TC>;
206
302
  /**
207
- * A helper wrapper to convert the string-keyed properties of an object to a Map of T.
208
- * Conversion fails if any element cannot be converted.
209
- * @param converter Converter used to convert each item in the map
303
+ * A helper function to create a {@link Converter} which converts the `string`-keyed properties
304
+ * using a supplied {@link Converter | Converter<T>} to produce a `Map<string, T>`.
305
+ * @remarks
306
+ * The resulting converter fails conversion if any element cannot be converted.
307
+ * @param converter - {@link Converter} used to convert each item in the source object.
308
+ * @returns A {@link Converter} which returns `Map<string, T>`.
309
+ * {@label default}
310
+ * @public
210
311
  */
211
312
  export declare function mapOf<T, TC = undefined, TK extends string = string>(converter: Converter<T, TC>): Converter<Map<TK, T>, TC>;
212
313
  /**
213
- * A helper wrapper to convert the string-keyed properties of an object to a Map of T.
214
- * If onError is 'fail' (default), then the entire conversion fails if any element
215
- * cannot be converted. If onError is 'ignore' failing elements are silently ignored.
216
- * @param converter Converter used to convert each item in the map
217
- * @param onError Specifies treatment of unconvertable elements
314
+ * A helper function to create a {@link Converter} which converts the `string`-keyed properties
315
+ * using a supplied {@link Converter | Converter<T>} to produce a `Map<string, T>` and optionally
316
+ * specified handling of elements that cannot be converted.
317
+ * @remarks
318
+ * if `onError` is `'fail'` (default), then the entire conversion fails if any key or element
319
+ * cannot be converted. If `onError` is `'ignore'`, failing elements are silently ignored.
320
+ * @param converter - {@link Converter} used to convert each item in the source object.
321
+ * @returns A {@link Converter} which returns `Map<string, T>`.
322
+ * {@label withOnError}
323
+ * @public
218
324
  */
219
325
  export declare function mapOf<T, TC = undefined, TK extends string = string>(converter: Converter<T, TC>, onError: 'fail' | 'ignore'): Converter<Map<TK, T>, TC>;
220
326
  /**
221
- * A helper wrapper to convert the string-keyed properties of an object to a Map of T.
222
- * If options specify a key converter it will be applied to each key.
223
- * If onError is 'fail' (default), then the entire conversion fails if any key or element
224
- * cannot be converted. If onError is 'ignore' failing elements are silently ignored.
225
- * @param converter Converter used to convert each item in the map
226
- * @param options Optional @see KeyedConverterOptions
327
+ * A helper function to create a {@link Converter} which converts the `string`-keyed properties
328
+ * using a supplied {@link Converter | Converter<T>} to produce a `Map<TK, T>`.
329
+ * @remarks
330
+ * If present, the supplied {@link Converters.KeyedConverterOptions | options} can provide a strongly-typed
331
+ * converter for keys and/or control the handling of elements that fail conversion.
332
+ * @param converter - {@link Converter} used to convert each item in the source object.
333
+ * @param options - Optional {@link Converters.KeyedConverterOptions | KeyedConverterOptions<TK, TC>} which
334
+ * supplies a key converter and/or error-handling options.
335
+ * @returns A {@link Converter} which returns `Map<TK, T>`.
336
+ * {@label withOptions}
337
+ * @public
227
338
  */
228
339
  export declare function mapOf<T, TC = undefined, TK extends string = string>(converter: Converter<T, TC>, options: KeyedConverterOptions<TK, TC>): Converter<Map<TK, T>, TC>;
229
340
  /**
230
- * A helper function to extract and convert an element from an array. Succeeds and returns
231
- * the converted value if the element exists in the supplied parameter and can be converted.
232
- * Fails otherwise.
233
- * @param index The index of the field to be extracted.
234
- * @param converter Converter used to convert the extracted element.
341
+ * Helper function to create a {@link Converter} which validates that a supplied value is
342
+ * of a type validated by a supplied validator function and returns it.
343
+ * @remarks
344
+ * If `validator` succeeds, this {@link Converter} returns {@link Success} with the supplied
345
+ * value of `from` coerced to type `<T>`. Returns a {@link Failure} with additional
346
+ * information otherwise.
347
+ * @param validator - A validator function to determine if the converted value is valid.
348
+ * @param description - A description of the validated type for use in error messages.
349
+ * @returns A new {@link Converter | Converter<T>} which applies the supplied validation.
350
+ * @public
351
+ */
352
+ export declare function validateWith<T, TC = undefined>(validator: (from: unknown) => from is T, description?: string): Converter<T, TC>;
353
+ /**
354
+ * A helper function to create a {@link Converter} which extracts and converts an element from an array.
355
+ * @remarks
356
+ * The returned {@link Converter} returns {@link Success} with the converted value if the element exists
357
+ * in the supplied array and can be converted. Returns {@link Failure} with an error message otherwise.
358
+ * @param index - The index of the element to be extracted.
359
+ * @param converter - A {@link Converter} used to convert the extracted element.
360
+ * @returns A {@link Converter | Converter<T>} which extracts the specified element from an array.
361
+ * @public
235
362
  */
236
363
  export declare function element<T, TC = undefined>(index: number, converter: Converter<T, TC>): Converter<T, TC>;
237
364
  /**
238
- * A helper function to extract and convert an optional element from an array. Succeeds
239
- * and returns the converted value if the element exists in the supplied parameter and can
240
- * be converted. Succeeds with undefined if the parameter is an array but the index is too
241
- * large. Fails if the supplied parameter is not an array, if the requested index is negative,
242
- * or if the element cannot be converted.
243
- * @param name The name of the field to be extracted.
244
- * @param converter Converter used to convert the extracted field.
365
+ * A helper function to create a {@link Converter} which extracts and converts an optional element from an array.
366
+ * @remarks
367
+ * The resulting {@link Converter} returns {@link Success} with the converted value if the element exsist
368
+ * in the supplied array and can be converted. Returns {@link Success} with value `undefined` if the parameter
369
+ * is an array but the index is out of range. Returns {@link Failure} with a message if the supplied parameter
370
+ * is not an array, if the requested index is negative, or if the element cannot be converted.
371
+ * @param index - The index of the element to be extracted.
372
+ * @param converter - A {@link Converter} used to convert the extracted element.
373
+ * @returns A {@link Converter | Converter<T>} which extracts the specified element from an array.
374
+ * @public
245
375
  */
246
376
  export declare function optionalElement<T, TC = undefined>(index: number, converter: Converter<T, TC>): Converter<T | undefined, TC>;
247
377
  /**
248
- * A helper function to extract and convert a field from an object. Succeeds and returns
249
- * the converted value if the field exists in the supplied parameter and can be converted.
250
- * Fails otherwise.
251
- * @param name The name of the field to be extracted.
252
- * @param converter Converter used to convert the extracted field.
378
+ * A helper function to create a {@link Converter} which extracts and convert a property specified
379
+ * by name from an object.
380
+ * @remarks
381
+ * The resulting {@link Converter} returns {@link Success} with the converted value of the correpsonding
382
+ * object property if the field exists and can be converted. Returns {@link Failure} with an error message
383
+ * otherwise.
384
+ * @param name - The name of the field to be extracted.
385
+ * @param converter - {@link Converter} used to convert the extracted field.
386
+ * @public
253
387
  */
254
388
  export declare function field<T, TC = undefined>(name: string, converter: Converter<T, TC>): Converter<T, TC>;
255
389
  /**
256
- * A helper function to extract and convert an optional field from an object. Succeeds
257
- * and returns the converted value if the field exists in the supplied parameter and can
258
- * be converted. Succeeds with undefined if the parameter is an object but the named field
259
- * is not present. Fails if the supplied parameter is not an object.
260
- * @param name The name of the field to be extracted.
261
- * @param converter Converter used to convert the extracted field.
390
+ * A helper function to create a {@link Converter} which extracts and convert a property specified
391
+ * by name from an object.
392
+ * @remarks
393
+ * The resulting {@link Converter} returns {@link Success} with the converted value of the correpsonding
394
+ * object property if the field exists and can be converted. Returns {@link Success} with value `undefined`
395
+ * if the supplied parametr is an object but the named field is not present. Returns {@link Failure} with
396
+ * an error message otherwise.
397
+ * @param name - The name of the field to be extracted.
398
+ * @param converter - {@link Converter} used to convert the extracted field.
399
+ * @public
262
400
  */
263
401
  export declare function optionalField<T, TC = undefined>(name: string, converter: Converter<T, TC>): Converter<T | undefined, TC>;
264
402
  /**
265
- * Options for an @see ObjectConverter.
403
+ * Options for an {@link Converters.ObjectConverter | ObjectConverter}.
404
+ * @public
266
405
  */
267
406
  export interface ObjectConverterOptions<T> {
268
407
  /**
@@ -277,101 +416,220 @@ export interface ObjectConverterOptions<T> {
277
416
  }
278
417
  /**
279
418
  * Per-property converters for each of the properties in type T.
419
+ * @remarks
420
+ * Used to construct a {@link Converters.ObjectConverter | ObjectConverter}
421
+ * @public
280
422
  */
281
423
  export declare type FieldConverters<T, TC = unknown> = {
282
424
  [key in keyof T]: Converter<T[key], TC>;
283
425
  };
284
426
  /**
285
- * Converter to convert an object of type T without changing shape, given a @see FieldConverters<T>.
286
- * If all of the required fields exist and can be converted, returns a new object with the converted
287
- * values under the original key names. If any required fields do not exist or cannot be converted,
288
- * the entire conversion fails. See @see ObjectConverterOptions for other conversion options.
427
+ * A {@link Converter} which converts an object of type `<T>` without changing shape, given
428
+ * a {@link Converters.FieldConverters | FieldConverters<T>} for the fields in the object.
429
+ * @remarks
430
+ * By default, if all of the required fields exist and can be converted, returns a new object with
431
+ * the converted values under the original key names. If any required fields do not exist or cannot
432
+ * be converted, the entire conversion fails. See {@link Converters.ObjectConverterOptions | ObjectConverterOptions}
433
+ * for other conversion options.
434
+ * @public
289
435
  */
290
436
  export declare class ObjectConverter<T, TC = unknown> extends BaseConverter<T, TC> {
437
+ /**
438
+ * Fields converted by this {@link Converters.ObjectConverter | ObjectConverter}.
439
+ */
291
440
  readonly fields: FieldConverters<T>;
441
+ /**
442
+ * Options used to initialize this {@link Converters.ObjectConverter | ObjectConverter}.
443
+ */
292
444
  readonly options: ObjectConverterOptions<T>;
293
445
  /**
294
- * Constructs a new @see ObjectConverter<T> using options supplied in an
295
- * optional @see ObjectConverterOptions<T>.
296
- * @param fields A @see FieldConverters<T> containing converters for each field
297
- * @param options An optional @see ObjectConverterOptions to configure the conversion
446
+ * Constructs a new {@link Converters.ObjectConverter | ObjectConverter<T>} using options
447
+ * supplied in a {@link Converters.ObjectConverterOptions | ObjectConverterOptions<T>}.
448
+ * @param fields - A {@link Converters.FieldConverters | FieldConverters<T>} containing
449
+ * a {@link Converter} for each field
450
+ * @param options - An optional @see ObjectConverterOptions to configure the conversion
451
+ * {@label withOptions}
298
452
  */
299
453
  constructor(fields: FieldConverters<T, TC>, options?: ObjectConverterOptions<T>);
300
454
  /**
301
- * Constructs a new @see ObjectConverter<T> using optional fields supplied in an
302
- * optional array of keyof T.
303
- * @param fields A @see FieldConverters<T> containing converters for each field
304
- * @param optional An optional array of keyof T listing fields that are not required.
455
+ * Constructs a new {@link Converters.ObjectConverter | ObjectConverter<T>} with optional
456
+ * properties specified as an array of `keyof T`.
457
+ * @param fields - A {@link Converters.FieldConverters | FieldConverters<T>} containing
458
+ * a {@link Converter} for each field.
459
+ * @param optional - An array of `keyof T` listing fields that are not required.
460
+ * {@label withKeys}
305
461
  */
306
462
  constructor(fields: FieldConverters<T, TC>, optional?: (keyof T)[]);
463
+ /**
464
+ * Creates a new {@link Converters.ObjectConverter | ObjectConverter} derived from this one but with
465
+ * new optional properties as specified by a supplied {@link Converters.ObjectConverterOptions | ObjectConverterOptions<T>}.
466
+ * @param options - The {@link Converters.ObjectConverterOptions | options} to be applied to the new
467
+ * converter.
468
+ * @returns A new {@link Converters.ObjectConverter | ObjectConverter} with the additional optional source properties.
469
+ * {@label withOptions}
470
+ */
307
471
  partial(options: ObjectConverterOptions<T>): ObjectConverter<Partial<T>, TC>;
472
+ /**
473
+ * Creates a new {@link Converters.ObjectConverter | ObjectConverter} derived from this one but with
474
+ * new optional properties as specified by a supplied array of `keyof T`.
475
+ * @param optional - The keys of the source object properties to be made optional.
476
+ * @returns A new {@link Converters.ObjectConverter | ObjectConverter} with the additional optional source
477
+ * properties.
478
+ * {@label withKeys}
479
+ */
308
480
  partial(optional?: (keyof T)[]): ObjectConverter<Partial<T>, TC>;
309
- addPartial(addOptionalFields: (keyof T)[]): ObjectConverter<Partial<T>, TC>;
481
+ /**
482
+ * Creates a new {@link Converters.ObjectConverter | ObjectConverter} derived from this one but with
483
+ * new optional properties as specified by a supplied array of `keyof T`.
484
+ * @param addOptionalProperties - The keys to be made optional.
485
+ * @returns A new {@link Converters.ObjectConverter | ObjectConverter} with the additional optional source
486
+ * properties.
487
+ */
488
+ addPartial(addOptionalProperties: (keyof T)[]): ObjectConverter<Partial<T>, TC>;
310
489
  }
311
490
  /**
312
- * Helper to convert an object without changing shape. The source parameter is an object with
313
- * key names that correspond to the target object and the appropriate corresponding converter
314
- * as the property value. If all of the requested fields exist and can be converted, returns a
315
- * new object with the converted values under the original key names. If any fields do not exist
316
- * or cannot be converted, the entire conversion fails.
491
+ * Helper function to create a {@link Converters.ObjectConverter | ObjectConverter<T>} which converts an object
492
+ * without changing shape, given a {@link Converters.FieldConverters | FieldConverters<T>} and an optional
493
+ * {@link Converters.ObjectConverterOptions | ObjectConverterOptions<T>} to further refine conversion beavior.
494
+ * @remarks
495
+ * By default, if all of the requested fields exist and can be converted, returns {@link Success}
496
+ * with a new object that contains the converted values under the original key names. If any requried properties
497
+ * do not exist or cannot be converted, the entire conversion fails, returning {@link Failure} with additional
498
+ * error information.
499
+ *
500
+ * Fields that succeed but convert to undefined are omitted from the result object but do not
501
+ * fail the conversion.
502
+ * @param properties - An {@link Converters.FieldConverters | FieldConverters<T>} defining the shape of the
503
+ * source object and {@link Converter | converters} to be applied to each properties.
504
+ * @param options - An {@link Converters.ObjectConverterOptions | ObjectConverterOptions<T>} containing options
505
+ * for the object converter.
506
+ * @returns A new {@link Converters.ObjectConverter | ObjectConverter} which applies the specified conversions.
507
+ * {@label withOptions}
508
+ * @public
509
+ */
510
+ export declare function object<T>(properties: FieldConverters<T>, options?: ObjectConverterOptions<T>): ObjectConverter<T>;
511
+ /**
512
+ * Helper function to create a {@link Converters.ObjectConverter | ObjectConverter<T>} which converts an object
513
+ * without changing shape, given a {@link Converters.FieldConverters | FieldConverters<T>} and a set of
514
+ * optional properties.
515
+ * @remarks
516
+ * By default, if all of the requested fields exist and can be converted, returns {@link Success}
517
+ * with a new object that contains the converted values under the original key names. If any requried properties
518
+ * do not exist or cannot be converted, the entire conversion fails, returning {@link Failure} with additional
519
+ * error information.
317
520
  *
318
521
  * Fields that succeed but convert to undefined are omitted from the result object but do not
319
522
  * fail the conversion.
320
- * @param fields An object containing defining the shape and converters to be applied.
321
- * @param opt An @see ObjectConverterOptions<T> containing options for the object converter, or
322
- * an array of (keyof T) containing optional keys.
523
+ * @param properties - An {@link Converters.FieldConverters | FieldConverters<T>} defining the shape of the
524
+ * source object and {@link Converter | converters} to be applied to each properties.
525
+ * @param optional - An array of `(keyof T)` listing the keys to be considered optional.
526
+ * {@label withKeys}
527
+ * @returns A new {@link Converters.ObjectConverter | ObjectConverter} which applies the specified conversions.
528
+ * @public
529
+ * @deprecated Use {@link Converters.(object:withOptions) | Converters.object(fields, options)} instead.
323
530
  */
324
- export declare function object<T>(fields: FieldConverters<T>, opt?: (keyof T)[] | ObjectConverterOptions<T>): ObjectConverter<T>;
531
+ export declare function object<T>(properties: FieldConverters<T>, optional: (keyof T)[]): ObjectConverter<T>;
325
532
  /**
326
- * Helper to convert an object without changing shape. The source parameter is an object with
327
- * key names that correspond to the target object and the appropriate corresponding converter
328
- * as the property value. If all of the requested fields exist and can be converted, returns a
329
- * new object with the converted values under the original key names. If any fields do not exist
330
- * or cannot be converted, the entire conversion fails.
533
+ * Options for the {@link Converters.(strictObject:withOptions)} helper function.
534
+ * @public
535
+ */
536
+ export declare type StrictObjectConverterOptions<T> = Omit<ObjectConverterOptions<T>, 'strict'>;
537
+ /**
538
+ * Helper function to create a {@link Converters.ObjectConverter | ObjectConverter} which converts an object
539
+ * without changing shape, a {@link Converters.FieldConverters | FieldConverters<T>} and an optional
540
+ * {@link Converters.StrictObjectConverterOptions | StrictObjectConverterOptions<T>} to further refine
541
+ * conversion behavior.
542
+ *
543
+ * @remarks
544
+ * Fields that succeed but convert to undefined are omitted from the result object but do not
545
+ * fail the conversion.
546
+ *
547
+ * The conversion fails if any unexpected fields are encountered.
331
548
  *
549
+ * @param properties - An object containing defining the shape and converters to be applied.
550
+ * @param options - An optional @see StrictObjectConverterOptions<T> containing options for the object converter.
551
+ * @returns A new {@link Converters.ObjectConverter | ObjectConverter} which applies the specified conversions.
552
+ * {@label withOptions}
553
+ * @public
554
+ */
555
+ export declare function strictObject<T>(properties: FieldConverters<T>, options?: StrictObjectConverterOptions<T>): ObjectConverter<T>;
556
+ /**
557
+ * Helper function to create a {@link Converters.ObjectConverter | ObjectConverter} which converts an object
558
+ * without changing shape, a {@link Converters.FieldConverters | FieldConverters<T>} and an optional
559
+ * {@link Converters.StrictObjectConverterOptions | StrictObjectConverterOptions<T>} to further refine
560
+ * conversion behavior.
561
+ *
562
+ * @remarks
332
563
  * Fields that succeed but convert to undefined are omitted from the result object but do not
333
564
  * fail the conversion.
334
565
  *
335
566
  * The conversion fails if any unexpected fields are encountered.
336
567
  *
337
- * @param fields An object containing defining the shape and converters to be applied.
338
- * @param opt - An @see ObjectConverterOptions<T> containing options for the object converter, or
339
- * an array of (keyof T) containing optional keys.
568
+ * @param properties - An object containing defining the shape and converters to be applied.
569
+ * @param optional - An array of `keyof T` containing keys to be considered optional.
570
+ * @returns A new {@link Converters.ObjectConverter | ObjectConverter} which applies the specified conversions.
571
+ * {@label withKeys}
572
+ * @deprecated Use {@link Converters.(strictObject:withOptions) | Converters.strictObject(options)} instead.
573
+ * @public
574
+ */
575
+ export declare function strictObject<T>(properties: FieldConverters<T>, optional: (keyof T)[]): ObjectConverter<T>;
576
+ /**
577
+ * A string-keyed `Record<string, Converter>` which maps specific {@link Converter | converters} to the
578
+ * value of a discriminator property.
579
+ * @public
340
580
  */
341
- export declare function strictObject<T>(fields: FieldConverters<T>, opt?: (keyof T)[] | Omit<ObjectConverterOptions<T>, 'strict'>): ObjectConverter<T>;
342
581
  export declare type DiscriminatedObjectConverters<T, TD extends string = string, TC = unknown> = Record<TD, Converter<T, TC>>;
343
582
  /**
344
- * Helper to convert a discriminated property without changing shape. Takes the name of the
345
- * discriminator property and a string-keyed record of object converters, and invokes the
346
- * converter that corresponds to the value of the discriminator property in the source object.
347
- * Fails if the source is not an object or if the discriminator property is missing or has
348
- * a value not present in the converters.
349
- * @param discriminatorProp Name of the property used to discriminate types
350
- * @param converters String-keyed record of converters to invoke, where key corresponds to a value of the
351
- * discriminator property.
583
+ * Helper to create a {@link Converter} whhich converts a discriminated object without changing shape.
584
+ * @remarks
585
+ * Takes the name of the discriminator property and a
586
+ * {@link Converters.DiscriminatedObjectConverters | string-keyed Record of converters}. During conversion,
587
+ * the resulting {@link Converter} invokes the converter from `converters` that corresponds to the value of
588
+ * the discriminator property in the source object.
589
+ *
590
+ * If the source is not an object, the discriminator property is missing, or the discriminator has
591
+ * a value not present in the converters, conversion fails and returns {@link Failure} with more information.
592
+ * @param discriminatorProp - Name of the property used to discriminate types.
593
+ * @param converters - {@link Converters.DiscriminatedObjectConverters | String-keyed record of converters} to
594
+ * invoke, where each key corresponds to a value of the discriminator property.
595
+ * @returns A {@link Converter} which converts the corresponding discriminated object.
596
+ * @public
352
597
  */
353
598
  export declare function discriminatedObject<T, TD extends string = string, TC = unknown>(discriminatorProp: string, converters: DiscriminatedObjectConverters<T, TD>): Converter<T, TC>;
354
599
  /**
355
- * Helper to convert an object to a new object with a different shape. The source parameter is
356
- * an object with key names that correspond to the target object, and an approriate _field_
357
- * converter that will extract and convert a single field from the source object.
600
+ * Helper to create a {@link Converter} which converts a source object to a new object with a
601
+ * different shape.
358
602
  *
359
- * If all of the extracted fields exist and can be converted, returns a new object with the
360
- * converted values under the original key names. If any fields to be extracted do not exist
361
- * or cannot be converted, the entire conversion fails.
603
+ * @remarks
604
+ * On successful conversion, the resulting {@link Converter} returns {@link Success} with a new
605
+ * object, which contains the converted values under the key names specified at initialization time.
606
+ * It returns {@link Failure} with an error message if any fields to be extracted do not exist
607
+ * or cannot be converted.
362
608
  *
363
609
  * Fields that succeed but convert to undefined are omitted from the result object but do not
364
610
  * fail the conversion.
365
611
  *
366
- * @param fields An object defining the shape of the target object and the field converters
367
- * to be used to construct it.
612
+ * @param properties - An object with key names that correspond to the target object and an
613
+ * appropriate {@link Converters.FieldConverters | FieldConverter} which extracts and converts
614
+ * a single filed from the source object.
615
+ * @returns A {@link Converter} with the specified conversion behavior.
616
+ * @public
368
617
  */
369
- export declare function transform<T, TC = unknown>(fields: FieldConverters<T, TC>): Converter<T, TC>;
618
+ export declare function transform<T, TC = unknown>(properties: FieldConverters<T, TC>): Converter<T, TC>;
370
619
  /**
371
- * A helper wrapper to convert a range of some other comparable type
372
- * @param converter Converter used to convert min and max extent of the raid
373
- * @param constructor Optional static constructor to instantiate the object
620
+ * A helper wrapper to construct a {@link Converter} which converts to an arbitrary strongly-typed
621
+ * range of some comparable type.
622
+ * @param converter - {@link Converter} used to convert `min` and `max` extent of the range.
623
+ * @param constructor - Static constructor to instantiate the object.
624
+ * @public
374
625
  */
375
626
  export declare function rangeTypeOf<T, RT extends RangeOf<T>, TC = unknown>(converter: Converter<T, TC>, constructor: (init: RangeOfProperties<T>) => Result<RT>): Converter<RT, TC>;
627
+ /**
628
+ * A helper wrapper to construct a {@link Converter} which converts to {@link RangeOf | RangeOf<T>}
629
+ * where `<T>` is some comparable type.
630
+ * @param converter - {@link Converter} used to convert `min` and `max` extent of the range.
631
+ * @public
632
+ */
376
633
  export declare function rangeOf<T, TC = unknown>(converter: Converter<T, TC>): Converter<RangeOf<T>, TC>;
377
634
  export {};
635
+ //# sourceMappingURL=converters.d.ts.map