@dereekb/util 13.9.0 → 13.10.1

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 (59) hide show
  1. package/fetch/index.cjs.js +5 -3
  2. package/fetch/index.esm.js +5 -3
  3. package/fetch/package.json +3 -3
  4. package/index.cjs.js +682 -384
  5. package/index.esm.js +676 -384
  6. package/package.json +5 -5
  7. package/src/lib/array/array.boolean.d.ts +4 -0
  8. package/src/lib/array/array.number.d.ts +3 -0
  9. package/src/lib/auth/auth.role.claims.d.ts +5 -0
  10. package/src/lib/auth/auth.role.d.ts +5 -0
  11. package/src/lib/boolean.d.ts +4 -0
  12. package/src/lib/contact/domain.d.ts +5 -0
  13. package/src/lib/contact/email.d.ts +10 -0
  14. package/src/lib/contact/phone.d.ts +10 -0
  15. package/src/lib/date/date.d.ts +77 -0
  16. package/src/lib/date/date.time.d.ts +4 -0
  17. package/src/lib/date/date.unix.d.ts +4 -0
  18. package/src/lib/date/hour.d.ts +8 -0
  19. package/src/lib/encryption/encryption.object.d.ts +4 -0
  20. package/src/lib/error/error.d.ts +4 -0
  21. package/src/lib/file/file.d.ts +4 -0
  22. package/src/lib/file/xml.d.ts +4 -0
  23. package/src/lib/function/function.d.ts +1 -1
  24. package/src/lib/hash.d.ts +4 -0
  25. package/src/lib/model/model.d.ts +20 -0
  26. package/src/lib/number/bitwise.dencoder.d.ts +8 -0
  27. package/src/lib/number/dollar.d.ts +31 -0
  28. package/src/lib/number/encoded.d.ts +8 -0
  29. package/src/lib/number/number.d.ts +15 -0
  30. package/src/lib/number/pay.d.ts +8 -0
  31. package/src/lib/number/round.d.ts +10 -0
  32. package/src/lib/object/object.d.ts +4 -0
  33. package/src/lib/object/object.filter.pojo.d.ts +10 -0
  34. package/src/lib/page/page.d.ts +5 -0
  35. package/src/lib/path/path.d.ts +8 -0
  36. package/src/lib/promise/promise.d.ts +5 -0
  37. package/src/lib/relation/relation.d.ts +10 -0
  38. package/src/lib/sort.d.ts +3 -0
  39. package/src/lib/storage/storage.d.ts +9 -0
  40. package/src/lib/string/case.d.ts +28 -0
  41. package/src/lib/string/dencoder.d.ts +12 -0
  42. package/src/lib/string/html.d.ts +20 -0
  43. package/src/lib/string/index.d.ts +1 -0
  44. package/src/lib/string/json.d.ts +4 -0
  45. package/src/lib/string/mimetype.d.ts +13 -1
  46. package/src/lib/string/password.d.ts +4 -0
  47. package/src/lib/string/prefix.d.ts +36 -0
  48. package/src/lib/string/tree.d.ts +4 -0
  49. package/src/lib/string/url.d.ts +35 -1
  50. package/src/lib/value/address.d.ts +35 -0
  51. package/src/lib/value/cron.d.ts +4 -0
  52. package/src/lib/value/indexed.d.ts +4 -0
  53. package/src/lib/value/modifier.d.ts +4 -0
  54. package/src/lib/value/pixel.d.ts +14 -0
  55. package/src/lib/value/point.d.ts +11 -0
  56. package/src/lib/value/zoom.d.ts +4 -0
  57. package/test/index.cjs.js +1 -0
  58. package/test/index.esm.js +1 -0
  59. package/test/package.json +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/util",
3
- "version": "13.9.0",
3
+ "version": "13.10.1",
4
4
  "exports": {
5
5
  "./test": {
6
6
  "module": "./test/index.esm.js",
@@ -23,13 +23,13 @@
23
23
  }
24
24
  },
25
25
  "peerDependencies": {
26
- "extra-set": "^3.0.0",
26
+ "extra-set": "^3.2.3",
27
27
  "fast-content-type-parse": "^3.0.0",
28
- "make-error": "^1.3.0",
29
- "ts-essentials": "^10.0.0"
28
+ "make-error": "^1.3.6",
29
+ "ts-essentials": "^10.2.0"
30
30
  },
31
31
  "devDependencies": {
32
- "date-fns": "4.0.0"
32
+ "date-fns": "4.1.0"
33
33
  },
34
34
  "module": "./index.esm.js",
35
35
  "main": "./index.cjs.js",
@@ -2,6 +2,10 @@ import { type ReadModelKeyFunction } from '../model/model';
2
2
  import { type Maybe } from '../value/maybe.type';
3
3
  /**
4
4
  * A string type used as a key in boolean arrays.
5
+ *
6
+ * @semanticType
7
+ * @semanticTopic identifier
8
+ * @semanticTopic string
5
9
  */
6
10
  export type BooleanStringKey = string;
7
11
  /**
@@ -65,6 +65,9 @@ export declare function reduceNumbersFn(reduceFn: (a: number, b: number) => numb
65
65
  export declare function reduceNumbersFn<D extends number>(reduceFn: (a: number, b: number) => number, emptyArrayValue?: D): (array: number[]) => number | D;
66
66
  /**
67
67
  * Exclusive end value used by range().
68
+ *
69
+ * @semanticType
70
+ * @semanticTopic numeric
68
71
  */
69
72
  export type RangeInputEndValue = number;
70
73
  /**
@@ -4,6 +4,11 @@ import { type SetIncludesMode } from '../set';
4
4
  import { type Maybe } from '../value/maybe.type';
5
5
  /**
6
6
  * Key in the claims.
7
+ *
8
+ * @semanticType
9
+ * @semanticTopic identifier
10
+ * @semanticTopic string
11
+ * @semanticTopic dereekb-util:auth
7
12
  */
8
13
  export type AuthClaimKey = string;
9
14
  /**
@@ -5,6 +5,11 @@ import { type Maybe } from '../value/maybe.type';
5
5
  * Is used in the client to decide which content a user can view.
6
6
  *
7
7
  * Roles should always be lowercase.
8
+ *
9
+ * @semanticType
10
+ * @semanticTopic identifier
11
+ * @semanticTopic string
12
+ * @semanticTopic dereekb-util:auth
8
13
  */
9
14
  export type AuthRole = string;
10
15
  /**
@@ -103,6 +103,10 @@ export declare function reduceBooleansFn(reduceFn: (a: boolean, b: boolean) => b
103
103
  export type BooleanFactory = Factory<boolean>;
104
104
  /**
105
105
  * Number from 0.0 to 100.0 used for the chance to return true.
106
+ *
107
+ * @semanticType
108
+ * @semanticTopic percent
109
+ * @semanticTopic numeric
106
110
  */
107
111
  export type BooleanTrueChance = number;
108
112
  /**
@@ -1,6 +1,11 @@
1
1
  import { type EmailAddress } from './email';
2
2
  /**
3
3
  * Domain name portion of an email address (e.g., "example.com").
4
+ *
5
+ * @semanticType
6
+ * @semanticTopic email
7
+ * @semanticTopic contact
8
+ * @semanticTopic string
4
9
  */
5
10
  export type EmailAddressDomain = string;
6
11
  /**
@@ -1,5 +1,10 @@
1
1
  /**
2
2
  * Type representing an email address as a string.
3
+ *
4
+ * @semanticType
5
+ * @semanticTopic email
6
+ * @semanticTopic contact
7
+ * @semanticTopic string
3
8
  */
4
9
  export type EmailAddress = string;
5
10
  /**
@@ -16,6 +21,11 @@ export interface NameEmailPair {
16
21
  export type EmailParticipant = NameEmailPair;
17
22
  /**
18
23
  * Email participant string. Starts with the email, followed by the name if available.
24
+ *
25
+ * @semanticType
26
+ * @semanticTopic email
27
+ * @semanticTopic contact
28
+ * @semanticTopic string
19
29
  */
20
30
  export type EmailParticipantString = string;
21
31
  /**
@@ -10,10 +10,20 @@ import { type Maybe } from '../value/maybe.type';
10
10
  * - +1234567890
11
11
  * - +1-555-555-5555
12
12
  * - 2345678;ext=123
13
+ *
14
+ * @semanticType
15
+ * @semanticTopic phone
16
+ * @semanticTopic contact
17
+ * @semanticTopic string
13
18
  */
14
19
  export type PhoneNumber = string;
15
20
  /**
16
21
  * 1-6 digit extension number
22
+ *
23
+ * @semanticType
24
+ * @semanticTopic phone
25
+ * @semanticTopic contact
26
+ * @semanticTopic string
17
27
  */
18
28
  export type PhoneExtensionNumber = string;
19
29
  /**
@@ -13,12 +13,20 @@ export type DateHourMinuteOrSecond = 'hour' | 'minute' | 'second';
13
13
  * I.E. "2020-04-30 00:00:00.000Z" and "2020-04-30T00:00:00.000Z"
14
14
  *
15
15
  * The only difference between this and an ISO8601DateString is the spacing between the date and time is allowed, while in ISO8601DateString it is not.
16
+ *
17
+ * @semanticType
18
+ * @semanticTopic date
19
+ * @semanticTopic string
16
20
  */
17
21
  export type RFC3339DateString = string;
18
22
  /**
19
23
  * A valid ISO8601 formatted date string.
20
24
  *
21
25
  * I.E. "2020-04-30T00:00:00.000Z"
26
+ *
27
+ * @semanticType
28
+ * @semanticTopic date
29
+ * @semanticTopic string
22
30
  */
23
31
  export type ISO8601DateString = string;
24
32
  /**
@@ -38,6 +46,10 @@ export declare function isISO8601DateString(input: string): input is ISO8601Date
38
46
  * A UTC date string.
39
47
  *
40
48
  * I.E. "Sat, 03 Feb 2001 04:05:06 GMT"
49
+ *
50
+ * @semanticType
51
+ * @semanticTopic date
52
+ * @semanticTopic string
41
53
  */
42
54
  export type UTCDateString = string;
43
55
  /**
@@ -59,16 +71,28 @@ export declare function isUTCDateString(input: string): boolean;
59
71
  * A full ISO8601 date string that is in UTC.
60
72
  *
61
73
  * I.E. "2020-04-30T00:00:00.000Z"
74
+ *
75
+ * @semanticType
76
+ * @semanticTopic date
77
+ * @semanticTopic string
62
78
  */
63
79
  export type ISO8601DateStringUTCFull = string;
64
80
  /**
65
81
  * A valid timezone string.
66
82
  *
67
83
  * I.E. "UTC", "America/Denver", etc.
84
+ *
85
+ * @semanticType
86
+ * @semanticTopic timezone
87
+ * @semanticTopic string
68
88
  */
69
89
  export type TimezoneString = string;
70
90
  /**
71
91
  * A timezone abbreviation (UTC, EST, etc).
92
+ *
93
+ * @semanticType
94
+ * @semanticTopic timezone
95
+ * @semanticTopic string
72
96
  */
73
97
  export type TimezoneAbbreviation = string;
74
98
  /**
@@ -117,6 +141,10 @@ export type DateOrDateString = Date | ISO8601DateString;
117
141
  * I.E. 1921-06-23
118
142
  *
119
143
  * NOTE: Negative years and years with more than 4 digits are not supported/expected. Support can be added later, but will require adding a more complex regex, and improved parsing in @dereekb/date
144
+ *
145
+ * @semanticType
146
+ * @semanticTopic date
147
+ * @semanticTopic string
120
148
  */
121
149
  export type ISO8601DayString = string;
122
150
  /**
@@ -172,6 +200,10 @@ export declare function isISO8601DayString(input: string): input is ISO8601DaySt
172
200
  export declare function isISO8601DayStringStart(input: string): input is ISO8601DayString;
173
201
  /**
174
202
  * Date that is represented by slashes. Is considered in the Month/Day/Year format.
203
+ *
204
+ * @semanticType
205
+ * @semanticTopic date
206
+ * @semanticTopic string
175
207
  */
176
208
  export type MonthDaySlashDate = string;
177
209
  /**
@@ -198,6 +230,10 @@ export declare function monthDaySlashDateToDateString(slashDate: MonthDaySlashDa
198
230
  * Time in milliseconds since the epoch.
199
231
  *
200
232
  * Returned by Date.getTime().
233
+ *
234
+ * @semanticType
235
+ * @semanticTopic time
236
+ * @semanticTopic numeric
201
237
  */
202
238
  export type UnixDateTimeMillisecondsNumber = number;
203
239
  /**
@@ -222,6 +258,11 @@ export declare function dateFromDateOrTimeMillisecondsNumber(input: Maybe<DateOr
222
258
  export declare function unixMillisecondsNumberToDate(dateTimeNumber: Maybe<UnixDateTimeMillisecondsNumber>): Maybe<Date>;
223
259
  /**
224
260
  * Number of milliseconds.
261
+ *
262
+ * @semanticType
263
+ * @semanticTopic time
264
+ * @semanticTopic duration
265
+ * @semanticTopic numeric
225
266
  */
226
267
  export type Milliseconds = number;
227
268
  /**
@@ -242,18 +283,38 @@ export type DateOrMilliseconds = Date | Milliseconds;
242
283
  export declare function dateOrMillisecondsToDate(dateOrMilliseconds: DateOrMilliseconds, now?: Maybe<Date>): Date;
243
284
  /**
244
285
  * Number of seconds.
286
+ *
287
+ * @semanticType
288
+ * @semanticTopic time
289
+ * @semanticTopic duration
290
+ * @semanticTopic numeric
245
291
  */
246
292
  export type Seconds = number;
247
293
  /**
248
294
  * Number of minutes.
295
+ *
296
+ * @semanticType
297
+ * @semanticTopic time
298
+ * @semanticTopic duration
299
+ * @semanticTopic numeric
249
300
  */
250
301
  export type Minutes = number;
251
302
  /**
252
303
  * Number of hours.
304
+ *
305
+ * @semanticType
306
+ * @semanticTopic time
307
+ * @semanticTopic duration
308
+ * @semanticTopic numeric
253
309
  */
254
310
  export type Hours = number;
255
311
  /**
256
312
  * Number of days.
313
+ *
314
+ * @semanticType
315
+ * @semanticTopic time
316
+ * @semanticTopic duration
317
+ * @semanticTopic numeric
257
318
  */
258
319
  export type Days = number;
259
320
  /**
@@ -306,16 +367,28 @@ export declare const DAYS_IN_WEEK: Days;
306
367
  export declare const MS_IN_WEEK: Milliseconds;
307
368
  /**
308
369
  * Day of the month, 1-31
370
+ *
371
+ * @semanticType
372
+ * @semanticTopic date
373
+ * @semanticTopic numeric
309
374
  */
310
375
  export type DayOfMonth = number;
311
376
  /**
312
377
  * Month of the year, 1-12.
313
378
  *
314
379
  * NOTE: The month from Date.getMonth() is from 0-11. Use monthOfYearFromDate() to get the MonthOfYear value.
380
+ *
381
+ * @semanticType
382
+ * @semanticTopic date
383
+ * @semanticTopic numeric
315
384
  */
316
385
  export type MonthOfYear = number;
317
386
  /**
318
387
  * Javascript Date month number. 0-11.
388
+ *
389
+ * @semanticType
390
+ * @semanticTopic date
391
+ * @semanticTopic numeric
319
392
  */
320
393
  export type DateMonth = number;
321
394
  /**
@@ -352,6 +425,10 @@ export declare function monthOfYearFromDateMonth(dateMonth: DateMonth): MonthOfY
352
425
  export declare function makeDateMonthForMonthOfYear(monthOfYear: MonthOfYear): DateMonth;
353
426
  /**
354
427
  * Year number. I.E. 2022
428
+ *
429
+ * @semanticType
430
+ * @semanticTopic date
431
+ * @semanticTopic numeric
355
432
  */
356
433
  export type YearNumber = number;
357
434
  /**
@@ -8,6 +8,10 @@ import { type Maybe } from '../value/maybe.type';
8
8
  * - 1:20
9
9
  * - 120AM
10
10
  * - 120
11
+ *
12
+ * @semanticType
13
+ * @semanticTopic time
14
+ * @semanticTopic string
11
15
  */
12
16
  export type ReadableTimeString = string;
13
17
  /**
@@ -3,6 +3,10 @@ import { type Maybe, type MaybeNot } from '../value/maybe.type';
3
3
  * This value is in seconds since the Epoch.
4
4
  *
5
5
  * Use UnixDateTimeMillisecondsNumber instead if you need milliseconds.
6
+ *
7
+ * @semanticType
8
+ * @semanticTopic time
9
+ * @semanticTopic numeric
6
10
  */
7
11
  export type UnixDateTimeSecondsNumber = number;
8
12
  /**
@@ -11,6 +11,10 @@ import { type Hours, type Minutes } from './date';
11
11
  *
12
12
  * - 10 minutes: 0.16
13
13
  * - 15 minutes : 0.25
14
+ *
15
+ * @semanticType
16
+ * @semanticTopic date
17
+ * @semanticTopic numeric
14
18
  */
15
19
  export type FractionalHour = number;
16
20
  /**
@@ -59,6 +63,10 @@ export declare function computeNextFractionalHour(input: FractionalHour, change:
59
63
  * The minute of the day.
60
64
  *
61
65
  * Number from 0-1439.
66
+ *
67
+ * @semanticType
68
+ * @semanticTopic date
69
+ * @semanticTopic numeric
62
70
  */
63
71
  export type MinuteOfDay = number;
64
72
  export declare const MINUTE_OF_DAY_MINIUMUM = 0;
@@ -3,6 +3,10 @@
3
3
  *
4
4
  * Use this type to distinguish encrypted ciphertext from plain strings at the type level.
5
5
  * The actual encryption algorithm is determined by the {@link StringEncryptionProvider}.
6
+ *
7
+ * @semanticType
8
+ * @semanticTopic string
9
+ * @semanticTopic dereekb-util:encryption
6
10
  */
7
11
  export type EncryptedString = string;
8
12
  /**
@@ -5,6 +5,10 @@ import { type Maybe } from '../value/maybe.type';
5
5
  export type ThrowErrorFunction<T = unknown> = (error: T) => never | void;
6
6
  /**
7
7
  * A unique identifier for a specific error.
8
+ *
9
+ * @semanticType
10
+ * @semanticTopic identifier
11
+ * @semanticTopic string
8
12
  */
9
13
  export type StringErrorCode = string;
10
14
  /**
@@ -1,4 +1,8 @@
1
1
  /**
2
2
  * File size in bytes.
3
+ *
4
+ * @semanticType
5
+ * @semanticTopic measurement
6
+ * @semanticTopic numeric
3
7
  */
4
8
  export type FileSize = number;
@@ -1,4 +1,8 @@
1
1
  /**
2
2
  * String value containing an XML SVG string.
3
+ *
4
+ * @semanticType
5
+ * @semanticTopic string
6
+ * @semanticTopic dereekb-util:xml
3
7
  */
4
8
  export type XMLSVG = string;
@@ -3,4 +3,4 @@
3
3
  *
4
4
  * Alias of MAP_IDENTITY, so `isMapIdentityFunction()` will return true for this function.
5
5
  */
6
- export declare const passThrough: <T>(input: T) => T;
6
+ export { MAP_IDENTITY as passThrough } from '../value/map';
package/src/lib/hash.d.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  /**
2
2
  * Represents a salt value used in hashing.
3
+ *
4
+ * @semanticType
5
+ * @semanticTopic string
6
+ * @semanticTopic dereekb-util:hash
3
7
  */
4
8
  export type HashSalt = string;
5
9
  /**
@@ -3,18 +3,34 @@ import { type Maybe } from '../value/maybe.type';
3
3
  import { type MapFunction } from '../value/map';
4
4
  /**
5
5
  * A string model key
6
+ *
7
+ * @semanticType
8
+ * @semanticTopic identifier
9
+ * @semanticTopic string
6
10
  */
7
11
  export type ModelKey = string;
8
12
  /**
9
13
  * A string model identifier (typically the document/record ID segment, not the full path).
14
+ *
15
+ * @semanticType
16
+ * @semanticTopic identifier
17
+ * @semanticTopic string
10
18
  */
11
19
  export type ModelId = string;
12
20
  /**
13
21
  * Arbitrary model type.
22
+ *
23
+ * @semanticType
24
+ * @semanticTopic identifier
25
+ * @semanticTopic string
14
26
  */
15
27
  export type ModelTypeString = string;
16
28
  /**
17
29
  * String model key from which the model's type can be inferred from.
30
+ *
31
+ * @semanticType
32
+ * @semanticTopic identifier
33
+ * @semanticTopic string
18
34
  */
19
35
  export type TypedModelKey = string;
20
36
  export declare const DEFAULT_UNKNOWN_MODEL_TYPE_STRING: ModelTypeString;
@@ -46,6 +62,10 @@ export interface ModelKeyTypePair<M extends ModelTypeString = ModelTypeString> e
46
62
  }
47
63
  /**
48
64
  * An encoded ModelKeyTypePair.
65
+ *
66
+ * @semanticType
67
+ * @semanticTopic identifier
68
+ * @semanticTopic string
49
69
  */
50
70
  export type ModelKeyTypePairString = string;
51
71
  export interface ModelKeyNamePair extends Pick<ModelKeyTypePair, 'key'> {
@@ -7,12 +7,20 @@ import { type MapFunction } from '../value';
7
7
  export declare const MAX_BITWISE_SET_SIZE = 32;
8
8
  /**
9
9
  * Enum or number value from 0 to 31 that denotes a specific item via index of the bit to measure.
10
+ *
11
+ * @semanticType
12
+ * @semanticTopic numeric
13
+ * @semanticTopic dereekb-util:encoding
10
14
  */
11
15
  export type BitwiseEncodedSetIndex = number;
12
16
  /**
13
17
  * Set of values that are encoded into a single number.
14
18
  *
15
19
  * The number can include up to 32 unique boolean values.
20
+ *
21
+ * @semanticType
22
+ * @semanticTopic numeric
23
+ * @semanticTopic dereekb-util:encoding
16
24
  */
17
25
  export type BitwiseEncodedSet = number;
18
26
  /**
@@ -1,20 +1,43 @@
1
1
  import { type Maybe } from '../value/maybe.type';
2
2
  /**
3
3
  * Whole dollar amounts, before the ','.
4
+ *
5
+ * @semanticType
6
+ * @semanticTopic currency
7
+ * @semanticTopic numeric
4
8
  */
5
9
  export type WholeDollarAmount = number;
6
10
  /**
7
11
  * Dollar amount number.
12
+ *
13
+ * @semanticType
14
+ * @semanticTopic currency
15
+ * @semanticTopic numeric
8
16
  */
9
17
  export type DollarAmount = number;
10
18
  /**
11
19
  * Dollars amount number per hour.
20
+ *
21
+ * @semanticType
22
+ * @semanticTopic currency
23
+ * @semanticTopic numeric
12
24
  */
13
25
  export type DollarAmountPerHour = number;
14
26
  /**
15
27
  * Dollars amount number per day.
28
+ *
29
+ * @semanticType
30
+ * @semanticTopic currency
31
+ * @semanticTopic numeric
16
32
  */
17
33
  export type DollarAmountPerDay = number;
34
+ /**
35
+ * Amount in whole cents.
36
+ *
37
+ * @semanticType
38
+ * @semanticTopic currency
39
+ * @semanticTopic numeric
40
+ */
18
41
  export type CentsAmount = number;
19
42
  export interface DollarsPair {
20
43
  dollars: WholeDollarAmount;
@@ -22,12 +45,20 @@ export interface DollarsPair {
22
45
  }
23
46
  /**
24
47
  * Unit to affix to a dollar amount string.
48
+ *
49
+ * @semanticType
50
+ * @semanticTopic currency
51
+ * @semanticTopic string
25
52
  */
26
53
  export type DollarAmountUnit = string;
27
54
  /**
28
55
  * String representing a dollar amount.
29
56
  *
30
57
  * Is formatted as a number with two decimal places. No unit is affixed.
58
+ *
59
+ * @semanticType
60
+ * @semanticTopic currency
61
+ * @semanticTopic string
31
62
  */
32
63
  export type DollarAmountString = string;
33
64
  /**
@@ -9,6 +9,10 @@
9
9
  * const encoded: Radix36EncodedNumber = 'z'; // represents 35
10
10
  * const largeEncoded: Radix36EncodedNumber = '2s'; // represents 100
11
11
  * ```
12
+ *
13
+ * @semanticType
14
+ * @semanticTopic string
15
+ * @semanticTopic dereekb-util:encoding
12
16
  */
13
17
  export type Radix36EncodedNumber = string;
14
18
  /**
@@ -47,6 +51,10 @@ export declare function encodeRadix36Number(number: number): Radix36EncodedNumbe
47
51
  export declare function decodeRadix36Number(encoded: Radix36EncodedNumber): number;
48
52
  /**
49
53
  * A string containing only hexadecimal characters (0-9, a-f or A-F).
54
+ *
55
+ * @semanticType
56
+ * @semanticTopic string
57
+ * @semanticTopic dereekb-util:encoding
50
58
  */
51
59
  export type HexString = string;
52
60
  /**
@@ -8,22 +8,37 @@ import { type Maybe } from '../value/maybe.type';
8
8
  * ```ts
9
9
  * const totalUsers: Count = 42;
10
10
  * ```
11
+ *
12
+ * @semanticType
13
+ * @semanticTopic numeric
11
14
  */
12
15
  export type Count = number;
13
16
  /**
14
17
  * A string represented within a number.
18
+ *
19
+ * @semanticType
20
+ * @semanticTopic numeric
21
+ * @semanticTopic string
15
22
  */
16
23
  export type NumberString = string;
17
24
  /**
18
25
  * Number that represents a percent.
19
26
  *
20
27
  * e.g. PercentNumber of 5 = 0.05 = 5%
28
+ *
29
+ * @semanticType
30
+ * @semanticTopic percent
31
+ * @semanticTopic numeric
21
32
  */
22
33
  export type PercentNumber = number;
23
34
  /**
24
35
  * A percent decimal value.
25
36
  *
26
37
  * e.g. PercentDecimal of 0.05 = 5%
38
+ *
39
+ * @semanticType
40
+ * @semanticTopic percent
41
+ * @semanticTopic numeric
27
42
  */
28
43
  export type PercentDecimal = number;
29
44
  /**
@@ -1,8 +1,16 @@
1
1
  /**
2
2
  * Rate per hour the worker should be paid.
3
+ *
4
+ * @semanticType
5
+ * @semanticTopic currency
6
+ * @semanticTopic numeric
3
7
  */
4
8
  export type PayRate = number;
5
9
  /**
6
10
  * The total pay amount that should be paid.
11
+ *
12
+ * @semanticType
13
+ * @semanticTopic currency
14
+ * @semanticTopic numeric
7
15
  */
8
16
  export type PayAmount = number;
@@ -14,6 +14,10 @@ export declare function roundingFunction(type: NumberRounding): RoundingFunction
14
14
  export type RoundingInput = NumberRounding | RoundingFunction;
15
15
  /**
16
16
  * The number of decimal places ot use.
17
+ *
18
+ * @semanticType
19
+ * @semanticTopic numeric
20
+ * @semanticTopic measurement
17
21
  */
18
22
  export type NumberPrecision = number;
19
23
  /**
@@ -89,10 +93,16 @@ export declare function roundToPrecision(value: number, precision: NumberPrecisi
89
93
  export declare function cutToPrecision(value: number, precision: NumberPrecision): number;
90
94
  /**
91
95
  * Number used to increase or decrease by the "step" value. When used in rounding the steps are aligned at a StepOrigin.
96
+ *
97
+ * @semanticType
98
+ * @semanticTopic numeric
92
99
  */
93
100
  export type StepNumber = number;
94
101
  /**
95
102
  * Origin value for StepNumbers that is used as an offset for input. Is usually 0.
103
+ *
104
+ * @semanticType
105
+ * @semanticTopic numeric
96
106
  */
97
107
  export type StepOrigin = number;
98
108
  /**
@@ -11,6 +11,10 @@ export type POJOKey = PrimativeKey | symbol;
11
11
  export type JsonSerializableObject = Record<PrimativeKey, any>;
12
12
  /**
13
13
  * String key of an object.
14
+ *
15
+ * @semanticType
16
+ * @semanticTopic identifier
17
+ * @semanticTopic string
14
18
  */
15
19
  export type ObjectKey = string;
16
20
  /**