@zelgadis87/utils-core 5.2.12 → 5.3.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.
- package/.rollup/index.cjs +3448 -0
- package/.rollup/index.cjs.map +1 -0
- package/.rollup/index.d.ts +1409 -0
- package/.rollup/index.mjs +3268 -0
- package/.rollup/index.mjs.map +1 -0
- package/.rollup/tsconfig.tsbuildinfo +1 -0
- package/CHANGELOG.md +17 -0
- package/package.json +6 -8
- package/src/lazy/Cached.ts +216 -0
- package/src/lazy/Lazy.ts +4 -0
- package/src/lazy/LazyAsync.ts +4 -0
- package/src/lazy/_index.ts +1 -0
- package/src/utils/arrays/indexBy.ts +17 -17
- package/src/utils/arrays.ts +3 -1
- package/dist/Logger.d.ts +0 -22
- package/dist/Optional.d.ts +0 -108
- package/dist/async/CancelableDeferred.d.ts +0 -17
- package/dist/async/Deferred.d.ts +0 -32
- package/dist/async/RateThrottler.d.ts +0 -13
- package/dist/async/Semaphore.d.ts +0 -17
- package/dist/async/_index.d.ts +0 -3
- package/dist/index.d.ts +0 -8
- package/dist/lazy/Lazy.d.ts +0 -22
- package/dist/lazy/LazyAsync.d.ts +0 -24
- package/dist/lazy/LazyDictionary.d.ts +0 -9
- package/dist/lazy/_index.d.ts +0 -3
- package/dist/sorting/ComparisonChain.d.ts +0 -57
- package/dist/sorting/Sorter.d.ts +0 -121
- package/dist/sorting/_index.d.ts +0 -2
- package/dist/sorting/types.d.ts +0 -5
- package/dist/time/RandomTimeDuration.d.ts +0 -9
- package/dist/time/TimeBase.d.ts +0 -49
- package/dist/time/TimeDuration.d.ts +0 -71
- package/dist/time/TimeFrequency.d.ts +0 -10
- package/dist/time/TimeInstant.d.ts +0 -174
- package/dist/time/TimeInstantBuilder.d.ts +0 -72
- package/dist/time/TimeRange.d.ts +0 -11
- package/dist/time/TimeUnit.d.ts +0 -15
- package/dist/time/_index.d.ts +0 -8
- package/dist/time/constants.d.ts +0 -14
- package/dist/time/types.d.ts +0 -29
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/upgrade/DataUpgrader.d.ts +0 -22
- package/dist/upgrade/_index.d.ts +0 -2
- package/dist/upgrade/errors.d.ts +0 -12
- package/dist/upgrade/getTransitionsPath.d.ts +0 -3
- package/dist/upgrade/types.d.ts +0 -31
- package/dist/utils/_index.d.ts +0 -15
- package/dist/utils/arrays/groupBy.d.ts +0 -9
- package/dist/utils/arrays/indexBy.d.ts +0 -7
- package/dist/utils/arrays/statistics.d.ts +0 -8
- package/dist/utils/arrays/uniqBy.d.ts +0 -4
- package/dist/utils/arrays.d.ts +0 -71
- package/dist/utils/booleans.d.ts +0 -2
- package/dist/utils/css.d.ts +0 -14
- package/dist/utils/empties.d.ts +0 -18
- package/dist/utils/errors/withTryCatch.d.ts +0 -4
- package/dist/utils/errors.d.ts +0 -20
- package/dist/utils/functions/_index.d.ts +0 -3
- package/dist/utils/functions/constant.d.ts +0 -11
- package/dist/utils/functions/iff.d.ts +0 -8
- package/dist/utils/functions/predicateBuilder.d.ts +0 -7
- package/dist/utils/functions.d.ts +0 -41
- package/dist/utils/json.d.ts +0 -11
- package/dist/utils/nulls.d.ts +0 -9
- package/dist/utils/numbers/round.d.ts +0 -8
- package/dist/utils/numbers.d.ts +0 -35
- package/dist/utils/operations.d.ts +0 -28
- package/dist/utils/primitives.d.ts +0 -3
- package/dist/utils/promises.d.ts +0 -10
- package/dist/utils/random.d.ts +0 -3
- package/dist/utils/records/entries.d.ts +0 -7
- package/dist/utils/records.d.ts +0 -63
- package/dist/utils/strings/StringParts.d.ts +0 -38
- package/dist/utils/strings.d.ts +0 -20
- package/esbuild/index.cjs +0 -3380
- package/esbuild/index.cjs.map +0 -7
- package/esbuild/index.mjs +0 -3177
- package/esbuild/index.mjs.map +0 -7
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { ICancelable, ICancelablePromise } from "../async/Deferred.js";
|
|
2
|
-
import { TComparisonResult } from "../sorting/_index.js";
|
|
3
|
-
import { TIntervalHandle, TTimeoutHandle } from "../utils/_index.js";
|
|
4
|
-
import TimeBase, { type TTimeInUnits } from "./TimeBase";
|
|
5
|
-
import TimeInstant from "./TimeInstant";
|
|
6
|
-
import { TimeUnit } from "./TimeUnit";
|
|
7
|
-
export declare class TimeDuration extends TimeBase<TimeDuration> {
|
|
8
|
-
protected constructor(value: number, unit: TimeUnit);
|
|
9
|
-
protected create(value: number, unit: TimeUnit): TimeDuration;
|
|
10
|
-
addDuration(duration: TimeDuration): TimeDuration;
|
|
11
|
-
removeDuration(duration: TimeDuration): TimeDuration;
|
|
12
|
-
removeUnits(n: number, unit: TimeUnit): TimeDuration;
|
|
13
|
-
multiplyBy(times: number): TimeDuration;
|
|
14
|
-
divideBy(times: number): TimeDuration;
|
|
15
|
-
/**
|
|
16
|
-
* Returns the current duration in a human readable format, prioritizing the most significant unit of time and excluding the rest.
|
|
17
|
-
* @todo[2023-06] Should allow more customization options
|
|
18
|
-
* @todo[2023-06] By default should show the secondary unit only when actually needed (eg, 1h 20m & 3h, instead of 1h 20m & 3h 28m)
|
|
19
|
-
* @todo[2023-06] Should not allow negative durations, as this is a duration and not an instant.
|
|
20
|
-
* @returns the duration, with only the most significant units displayed as a human readable string, eg: 1d 20h, 10m 30s.
|
|
21
|
-
*/
|
|
22
|
-
get formatted(): string;
|
|
23
|
-
interval(cb: () => unknown): TIntervalHandle;
|
|
24
|
-
timeout(cb: () => unknown): TTimeoutHandle;
|
|
25
|
-
cancelablePromise(): ICancelablePromise<void>;
|
|
26
|
-
promise(): Promise<void>;
|
|
27
|
-
delay(cb: () => unknown): void;
|
|
28
|
-
cancelableDelay(cb: () => unknown): ICancelable;
|
|
29
|
-
debounce<T>(fn: (t: T) => void): (t: T) => void;
|
|
30
|
-
toDigitalClock(): string;
|
|
31
|
-
get asSeconds(): string;
|
|
32
|
-
fromNow(): TimeInstant;
|
|
33
|
-
differenceFrom(other: TimeDuration): TimeDuration;
|
|
34
|
-
isGreaterThan(other: TimeDuration): boolean;
|
|
35
|
-
isLessThan(other: TimeDuration): boolean;
|
|
36
|
-
compareTo(other: TimeDuration): TComparisonResult;
|
|
37
|
-
atLeast(other: TimeDuration): TimeDuration;
|
|
38
|
-
atMost(other: TimeDuration): TimeDuration;
|
|
39
|
-
isEmpty(): boolean;
|
|
40
|
-
isNotEmpty(): boolean;
|
|
41
|
-
toUnits(): TTimeInUnits;
|
|
42
|
-
/**
|
|
43
|
-
* This method is used to provide a better DX when inspecting a TimeInstant object in DevTools.
|
|
44
|
-
*/
|
|
45
|
-
protected get _duration(): string;
|
|
46
|
-
toString(): string;
|
|
47
|
-
static parseHumanTime(humanTime: string): TimeDuration;
|
|
48
|
-
static compare(a: TimeDuration, b: TimeDuration): TComparisonResult;
|
|
49
|
-
static ms: (value: number) => TimeDuration;
|
|
50
|
-
static seconds: (value: number) => TimeDuration;
|
|
51
|
-
static minutes: (value: number) => TimeDuration;
|
|
52
|
-
static hours: (value: number) => TimeDuration;
|
|
53
|
-
static days: (value: number) => TimeDuration;
|
|
54
|
-
static shamefulUnref: (ms: TAllowedTimeDuration) => number;
|
|
55
|
-
static shamefulRef: (ms: TAllowedTimeDuration) => TimeDuration;
|
|
56
|
-
static unref: (ms: TValidTimeDuration) => TPredefinedTimeDuration;
|
|
57
|
-
static ref: (ms: TValidTimeDuration) => TimeDuration;
|
|
58
|
-
static fromMs(ms: number): TimeDuration;
|
|
59
|
-
static distanceFromNow(instant: TimeInstant): TimeDuration;
|
|
60
|
-
static distance(instant1: TimeInstant, instant2: TimeInstant): TimeDuration;
|
|
61
|
-
static greatest(duration1: TimeDuration, duration2: TimeDuration): TimeDuration;
|
|
62
|
-
static lowest(duration1: TimeDuration, duration2: TimeDuration): TimeDuration;
|
|
63
|
-
static ZERO: TimeDuration;
|
|
64
|
-
static fromJSON(ms: number): TimeDuration;
|
|
65
|
-
static fromUnits(parameters: Partial<TTimeInUnits>): TimeDuration;
|
|
66
|
-
}
|
|
67
|
-
export type TPredefinedTimeDuration = 0 | 50 | 100 | 150 | 200 | 250 | 300 | 500 | 1000 | 1500 | 2000 | 2500 | 5000;
|
|
68
|
-
export type TValidTimeDuration = TimeDuration | TPredefinedTimeDuration;
|
|
69
|
-
type TAllowedTimeDuration = TValidTimeDuration | number;
|
|
70
|
-
export declare function isAllowedTimeDuration(t: unknown): t is TAllowedTimeDuration;
|
|
71
|
-
export default TimeDuration;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { TPositiveNumber } from "../utils/_index";
|
|
2
|
-
import TimeDuration from "./TimeDuration";
|
|
3
|
-
export default class TimeFrequency {
|
|
4
|
-
readonly times: TPositiveNumber;
|
|
5
|
-
readonly period: TimeDuration;
|
|
6
|
-
constructor(times: TPositiveNumber, period: TimeDuration);
|
|
7
|
-
get frequency(): TimeDuration;
|
|
8
|
-
static onceEvery(period: TimeDuration): TimeFrequency;
|
|
9
|
-
static twiceEvery(period: TimeDuration): TimeFrequency;
|
|
10
|
-
}
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { ICancelable, ICancelablePromise } from "../async/Deferred.js";
|
|
2
|
-
import { TComparisonResult } from "../sorting/_index.js";
|
|
3
|
-
import TimeBase from "./TimeBase";
|
|
4
|
-
import TimeDuration from "./TimeDuration";
|
|
5
|
-
import { TTimeInstantBuilder, TTimeInstantCreationParameters, type TTimeInstantParameters } from "./TimeInstantBuilder.js";
|
|
6
|
-
import { TimeUnit } from "./TimeUnit";
|
|
7
|
-
import { TIso8601DateUtcString, TWeekNumber } from "./types";
|
|
8
|
-
export declare class TimeInstant extends TimeBase<TimeInstant> {
|
|
9
|
-
protected constructor(number: number, unit: TimeUnit);
|
|
10
|
-
protected create(value: number, unit: TimeUnit): TimeInstant;
|
|
11
|
-
addDuration(duration: TimeDuration): TimeInstant;
|
|
12
|
-
removeDuration(duration: TimeDuration): TimeInstant;
|
|
13
|
-
distanceFrom(instant: TimeInstant): TimeDuration;
|
|
14
|
-
distanceFromNow(): TimeDuration;
|
|
15
|
-
distanceFromUnixTimestamp(timestamp: number): TimeDuration;
|
|
16
|
-
timeLeftFrom(instant: TimeInstant): TimeDuration;
|
|
17
|
-
timeLeftFromNow(): TimeDuration;
|
|
18
|
-
distanceFromStartOfDay(): TimeDuration;
|
|
19
|
-
atStartOfDay(): TimeInstant;
|
|
20
|
-
distanceFromEndOfDay(): TimeDuration;
|
|
21
|
-
atEndOfDay(): TimeInstant;
|
|
22
|
-
promise(): Promise<void>;
|
|
23
|
-
cancelablePromise(): ICancelablePromise<void>;
|
|
24
|
-
delay(cb: () => unknown): void;
|
|
25
|
-
cancelableDelay(cb: () => unknown): ICancelable;
|
|
26
|
-
ensureInTheFuture(): void;
|
|
27
|
-
ensureInThePast(): void;
|
|
28
|
-
isToday(): boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Formats this instant using the given pattern. The pattern can contain the following tokens:
|
|
31
|
-
*
|
|
32
|
-
* Note: Implementation inspired by the small-date library (https://github.com/robinweser/small-date).
|
|
33
|
-
*
|
|
34
|
-
* | Token | Description | Example |
|
|
35
|
-
* |:------|:--------------------------------|:------------------------------|
|
|
36
|
-
* | D | Weekday, 1 letter | W |
|
|
37
|
-
* | DD | Weekday, 3 letters | Wed |
|
|
38
|
-
* | DDD | Weekday, long | Wednesday |
|
|
39
|
-
* | d | Day of the month, no padding | 3 |
|
|
40
|
-
* | dd | Day of the month, padded to 2 | 03 |
|
|
41
|
-
* | M | Month, numeric | 3 |
|
|
42
|
-
* | MM | Month, 2 digits | 03 |
|
|
43
|
-
* | MMM | Month, 3 letters | Mar |
|
|
44
|
-
* | MMMM | Month, long | March |
|
|
45
|
-
* | y | Year, numeric | 2021 |
|
|
46
|
-
* | yy | Year, 2 digits | 21 |
|
|
47
|
-
* | yyyy | Year, numeric | 2021 |
|
|
48
|
-
* | h | Hours, no padding | 6 |
|
|
49
|
-
* | hh | Hours, padded to 2 | 06 |
|
|
50
|
-
* | H | Hours in 24-format, no padding | 18 |
|
|
51
|
-
* | HH | Hours in 24-format, padded to 2 | 18 |
|
|
52
|
-
* | m | Minutes, no padding | 7 |
|
|
53
|
-
* | m | Minutes, padded to 2 | 07 |
|
|
54
|
-
* | s | Seconds, no padding | 8 |
|
|
55
|
-
* | ss | Seconds, padded to 2 | 08 |
|
|
56
|
-
* | S | Milliseconds, no padding | 9 |
|
|
57
|
-
* | SS | Milliseconds, padded to 2 | 09 |
|
|
58
|
-
* | SSS | Milliseconds, padded to 3 | 009 |
|
|
59
|
-
* | G | Era, narrow | A |
|
|
60
|
-
* | GG | Era, short | AD |
|
|
61
|
-
* | GGG | Era, long | Anno Domino |
|
|
62
|
-
* | Z | Time zone, short | GMT+1 |
|
|
63
|
-
* | ZZ | Time short, long C | entral European Standard Time |
|
|
64
|
-
* | P | Period of the day, narrow | in the morning |
|
|
65
|
-
* | PP | Period of the day, short | in the morning |
|
|
66
|
-
* | PPP | Period of the day, long | in the morning |
|
|
67
|
-
* | a | Meridiem | pm |
|
|
68
|
-
* @param pattern The pattern to use. Refer to the token table above for details.
|
|
69
|
-
* @param config An optional locale and timeZone definition to use during the format.
|
|
70
|
-
* @returns a string, formatted using the given pattern, at the given timeZone with the given locale.
|
|
71
|
-
*/
|
|
72
|
-
format(pattern: string, config?: {
|
|
73
|
-
locale?: string;
|
|
74
|
-
timeZone?: string;
|
|
75
|
-
}): string;
|
|
76
|
-
/**
|
|
77
|
-
* Parses a date string using the given pattern and creates a TimeInstant.
|
|
78
|
-
* This method is the inverse of format() - parsing a formatted string should recreate the original instant.
|
|
79
|
-
*
|
|
80
|
-
* For partial patterns (e.g., time-only or date-only), the missing components are taken from the base instant.
|
|
81
|
-
* For example, parsing "14:30" with base set to yesterday at midnight will result in yesterday at 14:30.
|
|
82
|
-
*
|
|
83
|
-
* Note: Currently performs basic validation (e.g., month 1-12, day 1-31) but does not validate
|
|
84
|
-
* calendar-specific constraints (e.g., February 30th, April 31st). Invalid dates may be
|
|
85
|
-
* normalized by the underlying Date constructor.
|
|
86
|
-
*
|
|
87
|
-
* @param dateString The date string to parse
|
|
88
|
-
* @param pattern The pattern used to parse the string (same tokens as format())
|
|
89
|
-
* @param base The base TimeInstant to use for partial patterns (defaults to now)
|
|
90
|
-
* @param config An optional locale and timeZone definition to use during parsing
|
|
91
|
-
* @returns A TimeInstant parsed from the string
|
|
92
|
-
* @throws Error if the string doesn't match the pattern or contains invalid basic values
|
|
93
|
-
* @todo Add calendar-aware validation to reject dates like February 30th, April 31st
|
|
94
|
-
*/
|
|
95
|
-
static fromString(dateString: string, pattern: string, base?: TimeInstant, config?: {
|
|
96
|
-
locale?: string;
|
|
97
|
-
timeZone?: string;
|
|
98
|
-
}): TimeInstant;
|
|
99
|
-
static parse(dateString: string, pattern: string, config?: {
|
|
100
|
-
locale?: string;
|
|
101
|
-
timeZone?: string;
|
|
102
|
-
}): Partial<TTimeInstantParameters>;
|
|
103
|
-
/**
|
|
104
|
-
* @returns this instant, in ISO 8601 format (eg, 2024-11-01T15:49:22.024Z). The format is meant to always be realiable.
|
|
105
|
-
*/
|
|
106
|
-
asIso8601(): TIso8601DateUtcString;
|
|
107
|
-
/**
|
|
108
|
-
* @returns this instant, in a human readable format, containing both the date and the time. The format COULD change in the future, do NOT use this method for consistent outputs.
|
|
109
|
-
*/
|
|
110
|
-
asHumanTimestamp(): string;
|
|
111
|
-
toUnixTimestamp(): number;
|
|
112
|
-
toDate(): Date;
|
|
113
|
-
toParameters(): TTimeInstantParameters;
|
|
114
|
-
/**
|
|
115
|
-
* @returns true if the instant is in the past, false otherwise
|
|
116
|
-
*/
|
|
117
|
-
isInThePast(): boolean;
|
|
118
|
-
/**
|
|
119
|
-
* @returns true if the instant is in the future, false otherwise
|
|
120
|
-
*/
|
|
121
|
-
isInTheFuture(): boolean;
|
|
122
|
-
isAfter(other: TimeInstant): boolean;
|
|
123
|
-
isBefore(other: TimeInstant): boolean;
|
|
124
|
-
compareTo(other: TimeInstant): TComparisonResult;
|
|
125
|
-
atTime(parameters: Partial<TTimeInstantCreationParameters & {
|
|
126
|
-
year: never;
|
|
127
|
-
month: never;
|
|
128
|
-
date: never;
|
|
129
|
-
}>): TimeInstant;
|
|
130
|
-
atDate(parameters: Partial<TTimeInstantCreationParameters & {
|
|
131
|
-
hours: never;
|
|
132
|
-
minutes: never;
|
|
133
|
-
seconds: never;
|
|
134
|
-
milliseconds: never;
|
|
135
|
-
}>): TimeInstant;
|
|
136
|
-
at(parameters: Partial<TTimeInstantCreationParameters>): TimeInstant;
|
|
137
|
-
isBetween(start: TimeInstant, end: TimeInstant): boolean;
|
|
138
|
-
static fromDate(date: Date): TimeInstant;
|
|
139
|
-
static fromUnixTimestamp(unixTimestamp: number): TimeInstant;
|
|
140
|
-
static fromUnixSeconds(unixSeconds: number): TimeInstant;
|
|
141
|
-
static fromParameters(parameters: Partial<TTimeInstantCreationParameters>, referenceDate?: Date | TimeInstant): TimeInstant;
|
|
142
|
-
static highest(instant1: TimeInstant, instant2: TimeInstant): TimeInstant;
|
|
143
|
-
static lowest(instant1: TimeInstant, instant2: TimeInstant): TimeInstant;
|
|
144
|
-
static builder(): TTimeInstantBuilder;
|
|
145
|
-
static fromIso8601(str: string): TimeInstant;
|
|
146
|
-
/**
|
|
147
|
-
* @deprecated [2025.10.19]: Use fromIso8601 instead.
|
|
148
|
-
*/
|
|
149
|
-
static tryFromIso8601: typeof TimeInstant.fromIso8601;
|
|
150
|
-
static now(): TimeInstant;
|
|
151
|
-
static compare(a: TimeInstant, b: TimeInstant): TComparisonResult;
|
|
152
|
-
roundedToStartOf(unit: TimeUnit): TimeInstant;
|
|
153
|
-
roundedToEndOf(unit: TimeUnit): TimeInstant;
|
|
154
|
-
roundedToNext(unit: TimeUnit, factor?: number): TimeInstant;
|
|
155
|
-
roundedToPrevious(unit: TimeUnit, factor?: number): TimeInstant;
|
|
156
|
-
roundedTo(unit: TimeUnit, factor?: number): TimeInstant;
|
|
157
|
-
/**
|
|
158
|
-
* Returns the week number represented by this instant, according to the ISO 8601 standard.
|
|
159
|
-
* Please note that the instant and the week number could be of two different years, eg the friday 1st january is actually part of week 52 of the previous year.
|
|
160
|
-
*/
|
|
161
|
-
get weekNumber(): {
|
|
162
|
-
weekNumber: TWeekNumber;
|
|
163
|
-
year: number;
|
|
164
|
-
};
|
|
165
|
-
/**
|
|
166
|
-
* This method is used to provide a better DX when inspecting a TimeInstant object in DevTools.
|
|
167
|
-
*/
|
|
168
|
-
protected get _time(): string;
|
|
169
|
-
toString(): string;
|
|
170
|
-
static ZERO: TimeInstant;
|
|
171
|
-
static fromJSON(ms: number): TimeInstant;
|
|
172
|
-
}
|
|
173
|
-
export declare function isTimeInstant(x: unknown): x is TimeInstant;
|
|
174
|
-
export default TimeInstant;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { TimeInstant } from "./TimeInstant.js";
|
|
2
|
-
import { TDayOfMonth, THourOfDay, TMillisecondOfSecond, TMinuteOfHour, TMonth, TSecondOfMinute, TUpToTwoDigits, type TMonthName, type TYear } from "./types.js";
|
|
3
|
-
type TRelativeSignum = '+' | '-';
|
|
4
|
-
type TRelativeNumber = `${TRelativeSignum}${TUpToTwoDigits}`;
|
|
5
|
-
export type TTimeInstantParameters = {
|
|
6
|
-
year: TYear;
|
|
7
|
-
month: TMonth;
|
|
8
|
-
date: TDayOfMonth;
|
|
9
|
-
hours: THourOfDay;
|
|
10
|
-
minutes: TMinuteOfHour;
|
|
11
|
-
seconds: TSecondOfMinute;
|
|
12
|
-
milliseconds: TMillisecondOfSecond;
|
|
13
|
-
};
|
|
14
|
-
export type TTimeInstantCreationParameters = {
|
|
15
|
-
year: TTimeInstantParameters["year"] | {
|
|
16
|
-
absolute: TTimeInstantParameters["year"];
|
|
17
|
-
} | TRelativeNumber | {
|
|
18
|
-
relative: number;
|
|
19
|
-
relativeTo: 'now' | TimeInstant;
|
|
20
|
-
} | 'next' | 'last' | 'current' | undefined;
|
|
21
|
-
month: TTimeInstantParameters["month"] | {
|
|
22
|
-
absolute: TTimeInstantParameters["month"];
|
|
23
|
-
} | TMonthName | TRelativeNumber | {
|
|
24
|
-
relative: number;
|
|
25
|
-
relativeTo: 'now' | TimeInstant;
|
|
26
|
-
} | 'next' | 'last' | 'current' | undefined;
|
|
27
|
-
date: TTimeInstantParameters["date"] | {
|
|
28
|
-
absolute: TTimeInstantParameters["date"];
|
|
29
|
-
} | TRelativeNumber | {
|
|
30
|
-
relative: number;
|
|
31
|
-
relativeTo: 'now' | TimeInstant;
|
|
32
|
-
} | 'next' | 'last' | 'current' | undefined;
|
|
33
|
-
hours: TTimeInstantParameters["hours"] | {
|
|
34
|
-
absolute: TTimeInstantParameters["hours"];
|
|
35
|
-
} | TRelativeNumber | {
|
|
36
|
-
relative: number;
|
|
37
|
-
relativeTo: 'now' | TimeInstant;
|
|
38
|
-
} | 'next' | 'last' | 'current' | undefined;
|
|
39
|
-
minutes: TTimeInstantParameters["minutes"] | {
|
|
40
|
-
absolute: TTimeInstantParameters["minutes"];
|
|
41
|
-
} | TRelativeNumber | {
|
|
42
|
-
relative: number;
|
|
43
|
-
relativeTo: 'now' | TimeInstant;
|
|
44
|
-
} | 'next' | 'last' | 'current' | undefined;
|
|
45
|
-
seconds: TTimeInstantParameters["seconds"] | {
|
|
46
|
-
absolute: TTimeInstantParameters["seconds"];
|
|
47
|
-
} | TRelativeNumber | {
|
|
48
|
-
relative: number;
|
|
49
|
-
relativeTo: 'now' | TimeInstant;
|
|
50
|
-
} | 'next' | 'last' | 'current' | undefined;
|
|
51
|
-
milliseconds: TTimeInstantParameters["milliseconds"] | {
|
|
52
|
-
absolute: TTimeInstantParameters["milliseconds"];
|
|
53
|
-
} | TRelativeNumber | {
|
|
54
|
-
relative: number;
|
|
55
|
-
relativeTo: 'now' | TimeInstant;
|
|
56
|
-
} | 'next' | 'last' | 'current' | undefined;
|
|
57
|
-
};
|
|
58
|
-
export declare function createTimeInstantFromParameters(aParameters: Partial<TTimeInstantCreationParameters>, aReferenceDate?: TimeInstant | Date): TimeInstant;
|
|
59
|
-
export declare function timeInstantBuilder(): {
|
|
60
|
-
year: (x: TTimeInstantCreationParameters["year"]) => /*elided*/ any;
|
|
61
|
-
month: (x: TTimeInstantCreationParameters["month"]) => /*elided*/ any;
|
|
62
|
-
date: (x: TTimeInstantCreationParameters["date"]) => /*elided*/ any;
|
|
63
|
-
hours: (x: TTimeInstantCreationParameters["hours"]) => /*elided*/ any;
|
|
64
|
-
minutes: (x: TTimeInstantCreationParameters["minutes"]) => /*elided*/ any;
|
|
65
|
-
seconds: (x: TTimeInstantCreationParameters["seconds"]) => /*elided*/ any;
|
|
66
|
-
milliseconds: (x: TTimeInstantCreationParameters["milliseconds"]) => /*elided*/ any;
|
|
67
|
-
values: (x: Partial<TTimeInstantCreationParameters>) => /*elided*/ any;
|
|
68
|
-
relativeTo: (x: TimeInstant | Date) => /*elided*/ any;
|
|
69
|
-
build: () => TimeInstant;
|
|
70
|
-
};
|
|
71
|
-
export type TTimeInstantBuilder = ReturnType<typeof timeInstantBuilder>;
|
|
72
|
-
export {};
|
package/dist/time/TimeRange.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TimeDuration } from "./_index.js";
|
|
2
|
-
import TimeInstant from "./TimeInstant.js";
|
|
3
|
-
export declare class TimeRange {
|
|
4
|
-
readonly start: TimeInstant;
|
|
5
|
-
readonly duration: TimeDuration;
|
|
6
|
-
readonly end: TimeInstant;
|
|
7
|
-
protected constructor(start: TimeInstant, duration: TimeDuration);
|
|
8
|
-
static fromInstants(a: TimeInstant, b: TimeInstant): TimeRange;
|
|
9
|
-
static fromInstantWithDuration(a: TimeInstant, d: TimeDuration): TimeRange;
|
|
10
|
-
static fromNowWithDuration(d: TimeDuration): TimeRange;
|
|
11
|
-
}
|
package/dist/time/TimeUnit.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare class TimeUnit {
|
|
2
|
-
readonly multiplier: number;
|
|
3
|
-
private constructor();
|
|
4
|
-
toUnit(value: number, unit: TimeUnit): number;
|
|
5
|
-
toMs(value: number): number;
|
|
6
|
-
toSeconds(value: number): number;
|
|
7
|
-
toMinutes(value: number): number;
|
|
8
|
-
toHours(value: number): number;
|
|
9
|
-
toDays(value: number): number;
|
|
10
|
-
static readonly MILLISECONDS: TimeUnit;
|
|
11
|
-
static readonly SECONDS: TimeUnit;
|
|
12
|
-
static readonly MINUTES: TimeUnit;
|
|
13
|
-
static readonly HOURS: TimeUnit;
|
|
14
|
-
static readonly DAYS: TimeUnit;
|
|
15
|
-
}
|
package/dist/time/_index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { default as RandomTimeDuration } from './RandomTimeDuration.js';
|
|
2
|
-
export * from './TimeBase.js';
|
|
3
|
-
export { isAllowedTimeDuration, TimeDuration, TPredefinedTimeDuration, TValidTimeDuration } from './TimeDuration.js';
|
|
4
|
-
export { default as TimeFrequency } from './TimeFrequency.js';
|
|
5
|
-
export * from './TimeInstant.js';
|
|
6
|
-
export * from './TimeRange.js';
|
|
7
|
-
export * from './TimeUnit.js';
|
|
8
|
-
export * from './types.js';
|
package/dist/time/constants.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const monthNames: {
|
|
2
|
-
readonly january: 1;
|
|
3
|
-
readonly february: 2;
|
|
4
|
-
readonly march: 3;
|
|
5
|
-
readonly april: 4;
|
|
6
|
-
readonly may: 5;
|
|
7
|
-
readonly june: 6;
|
|
8
|
-
readonly july: 7;
|
|
9
|
-
readonly august: 8;
|
|
10
|
-
readonly september: 9;
|
|
11
|
-
readonly october: 10;
|
|
12
|
-
readonly november: 11;
|
|
13
|
-
readonly december: 12;
|
|
14
|
-
};
|
package/dist/time/types.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { TDigit, TDigit1_9, TNumber0_1000, TParseableInt, type TPositiveNumber } from "../utils/_index";
|
|
2
|
-
import type { monthNames } from "./constants.ts";
|
|
3
|
-
export type TOneDigit = `${TDigit}`;
|
|
4
|
-
export type TTwoDigits = `${TDigit}${TDigit}`;
|
|
5
|
-
export type TThreeDigits = `${TDigit}${TDigit}${TDigit}`;
|
|
6
|
-
export type TFourDigits = `${TDigit}${TDigit}${TDigit}${TDigit}`;
|
|
7
|
-
export type TUpToTwoDigits = TOneDigit | `${TDigit1_9}${TDigit}`;
|
|
8
|
-
export type TUpToThreeDigits = TUpToTwoDigits | `${TDigit1_9}${TDigit}${TDigit}`;
|
|
9
|
-
export type TUpToFourDigits = TUpToThreeDigits | `${TDigit1_9}${TDigit}${TDigit}${TDigit}`;
|
|
10
|
-
export type TTwoDigitsMonth = TTwoDigits & TParseableInt<`0${TDigit1_9}` | '10' | '11' | '12'>;
|
|
11
|
-
export type TTwoDigitsDate = TTwoDigits & TParseableInt<`0${TDigit1_9}` | `1${TDigit}` | `2${TDigit}` | '30' | '31'>;
|
|
12
|
-
export type TTwoDigitsHour = TTwoDigits & TParseableInt<`0${TDigit1_9}` | `1${TDigit}` | '20' | '21' | '22' | '23' | '24'>;
|
|
13
|
-
export type TTwoDigitsMinute = TTwoDigits & TParseableInt<`0${TDigit1_9}` | `1${TDigit}` | `2${TDigit}` | `3${TDigit}` | `4${TDigit}` | `5${TDigit}`>;
|
|
14
|
-
export type TTwoDigitsSecond = TTwoDigits & TParseableInt<`0${TDigit1_9}` | `1${TDigit}` | `2${TDigit}` | `3${TDigit}` | `4${TDigit}` | `5${TDigit}`>;
|
|
15
|
-
export type TThreeDigitsMillisecond = TThreeDigits;
|
|
16
|
-
export type TFourDigitsYear = TFourDigits;
|
|
17
|
-
export type TFourDigitsMillisecond = `${'+' | '-'}${TThreeDigits}`;
|
|
18
|
-
export type TYear = TPositiveNumber;
|
|
19
|
-
export type TMonth = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
20
|
-
export type TMonthName = keyof typeof monthNames;
|
|
21
|
-
export type TDayOfMonth = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31;
|
|
22
|
-
export type TWeekNumber = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53;
|
|
23
|
-
export type TDayOfWeek = 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
|
24
|
-
export type THourOfDay = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23;
|
|
25
|
-
export type TMinuteOfHour = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59;
|
|
26
|
-
export type TSecondOfMinute = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59;
|
|
27
|
-
export type TMillisecondOfSecond = TNumber0_1000;
|
|
28
|
-
export type TIso8601DateString = `${string}-${string}-${string}T${string}:${string}:${string}.${string}${string}`;
|
|
29
|
-
export type TIso8601DateUtcString = `${string}-${string}-${string}T${string}:${string}:${string}.${string}Z`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"fileNames":["../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/utils/functions/constant.ts","../src/utils/nulls.ts","../src/optional.ts","../src/time/timeunit.ts","../src/time/timebase.ts","../src/time/timeduration.ts","../src/sorting/types.ts","../src/sorting/sorter.ts","../src/sorting/_index.ts","../src/utils/arrays/groupby.ts","../src/utils/arrays/indexby.ts","../src/utils/arrays/statistics.ts","../src/utils/arrays/uniqby.ts","../src/utils/arrays.ts","../src/utils/booleans.ts","../src/utils/records/entries.ts","../src/utils/records.ts","../src/utils/css.ts","../src/utils/empties.ts","../src/utils/operations.ts","../src/utils/errors/withtrycatch.ts","../src/utils/errors.ts","../src/utils/json.ts","../src/utils/numbers/round.ts","../src/utils/numbers.ts","../src/utils/primitives.ts","../src/utils/promises.ts","../src/utils/random.ts","../src/utils/strings/stringparts.ts","../src/utils/strings.ts","../src/utils/_index.ts","../src/utils/functions/iff.ts","../src/utils/functions/predicatebuilder.ts","../src/utils/functions/_index.ts","../src/utils/functions.ts","../src/async/deferred.ts","../src/time/constants.ts","../src/time/types.ts","../src/time/timeinstantbuilder.ts","../src/time/timeinstant.ts","../src/logger.ts","../src/time/timefrequency.ts","../src/async/ratethrottler.ts","../src/async/semaphore.ts","../src/async/_index.ts","../src/lazy/lazy.ts","../src/lazy/lazyasync.ts","../src/lazy/lazydictionary.ts","../src/lazy/_index.ts","../src/time/randomtimeduration.ts","../src/time/timerange.ts","../src/time/_index.ts","../src/upgrade/errors.ts","../src/upgrade/types.ts","../src/upgrade/gettransitionspath.ts","../src/upgrade/dataupgrader.ts","../src/upgrade/_index.ts","../src/index.ts"],"fileIdsList":[[94,101,102],[93],[94,100,116],[94,116],[61,67,89,99,103,107,110,115],[104,105,106],[89],[60],[89,98],[60,93],[65,66],[59,64,65,89,98],[62,63,64,96,98,100,108,109],[62,64,86],[62],[62,63,67,89,94,98],[64,89],[62,63,64,67,94,96,97],[60,93,95,96,98],[98,110],[89,95],[112,114],[89,111,112,113],[89,112],[60,72,73,75,76,77,78,80,81,83,84,85,86,88,93],[60,61,67,68,69,70,71,93],[72],[75,89],[60,79],[78,80,93],[59,92],[59,90,91],[80],[60,80,82,93],[64,93],[83],[74],[60,72,87],[60,72,88]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"97b4610fc57d7cb7bcd15d1c202d20ac13a0e62139d73b74b3728059972c214b","signature":"a0fe2024d137cc3066147a81ddc351fbf3c9a3376d39eab199878183e34dc7c6"},{"version":"974f6b38739fa55710a8d952b844a9966c1c3ddd57b3d995f528c7436014740d","signature":"26d664c8bd390124da755369abb46e32f59c4a7b2d34afbe8a3cdd73dfd05f6a"},{"version":"9d731ba242d613c2ca90c151356621d90655703a2dde7b470c5a2aeb7a4d2c0f","signature":"bb0e1c6c9873d069c8585d22bf0d827ee16b863bd72304fdd7905a1d2bafb94e"},{"version":"d8c0717016b8bbec4175b6a305e92a6a97e23ad2394e679651f1daa0651c8721","signature":"4ea44ed8a9f07c53b4c5731b390ca7933bd8642cec9c83d81415113ac74d38f4"},{"version":"7c3bfec21c91a0573d6b274aeeb88535e98edba40ee671fbf58bc4b6ec739099","signature":"5ef87cdf7d90c033d498320f5cf99e8d498ae03cd067cec648364e8847c22e49"},{"version":"caa5148346ef8007b2666eb429fe49551ead61bab426ce75ada21d635a6b493c","signature":"480ac82e1d700ee85b4bf6017d71ab9c0bdbfb61e8c6542d72567a7066dd1051"},{"version":"d3781289f931d1fd6da732725be3a924271f3126a60a11f738dab07a9de2f7d8","signature":"4d79eeb5415637be3229c2667895b56383253c77b8b33e61549b5128daf9e37a"},{"version":"04e7c40153b200903b1bbae64cac1f0f5b169d7d13f4b52892cd38a5cae42555","signature":"1e8929b769d7ef7a92fd776e340d7e795163c82119e79c0584e63460a39bc212"},{"version":"5143161b3eb7c229459037342dc8c08b3d83caf2eefdc0eca32e936b2f6d2ff3","signature":"ac1e60dde0f406f199f7ba55a4e6672672ba0e1f168287bfce3a5850b1d1baf1"},{"version":"9bb731f3e096c8fefced74e859609e059b9dfb51a3c9e03aae66853658a7f392","signature":"7c3cba64a692fecb43ac72f63682567b08bfd43d4a2635021cb402f0e01e210f"},{"version":"ddbee494557800bde90b7798b5ee9019758af82dcf9bfa61303a9740f67ca55f","signature":"4b289531c732bfc990b1d03925714094e7be4a960aef6e85f5d02d13dcd67f37"},{"version":"065815c5d2b778f409ae78a366079628d6b28c689647b358ee4cb854e92eead2","signature":"8da47ddef220dd11a8a0f431127f8d083ba95b7e2b45b266233812bcf1f13888"},{"version":"2fdcc3f88b19bda7bc74c8c6430b9e2f6eb6d252d812c508f48669a27b680d5f","signature":"e2ab4c29fa06a89dc35759aaf3354bb06cad41d3d6f1bf9e1ce482187cd1fb91"},{"version":"0d6699bf913fd4f1c22fac624df45137c4511cfb909b42ddf9c704bdac255f20","signature":"326fcf9610d71b042956b7a299d3e42feba0218a4c33817e182268aee25b6797"},{"version":"56571c3f44c6312462e8395ed75d05887dcbcb1581a0ad47dd72bcdbb898ea84","signature":"853de26cb0c4a51d7b511bf303ff4d6680bc18d36b3f2f6d7b8008c8927b58a1"},{"version":"70c8b0b1b54592827549014aac9193b037f6e1545572611c1b62c9a1b3c49739","signature":"46e174a254ea0e7b245c8dc35fcb430608e4d0bfba777e4c019a3a9ba055433b"},{"version":"b94823044eb88016e2983f27cd03908d0bf9a09c6d039af6fc026b86b051fd21","signature":"b7fb90103dc08cf90bec58f65c7d3de2f8a25410e7641311aa8156a18d78387e"},{"version":"a46374f16a16216d0b5b81c73044e4cb28dcc1dc9302757091548cc98e12d5b2","signature":"bf9ac00497f14af2cd1578e76cee191b7af9aa5bd657fa69e9eb7c972eab5453"},{"version":"378e70c02bd89d6b9aaa5b9330c4d63d6b5fc3063dbaf48501b8cba0b66fd7be","signature":"d374a2a5aa9485d6e0f4d41f11e000811e7874b0c78f87c5ae35daf3134ccbc8"},{"version":"8b8d66cde1dfd47c100b94d4cb0260ea18e295985755ee6cfc5b050474a299a4","signature":"c88d6c104b1991a032fa875f5eeb249b6681e717d81fc8f0e373db316a989338"},{"version":"f8767e0060c57dc52f2979f2f606e3c4ffcdda3461b670f5149e155a4318b708","signature":"27855538eb5e86ebcb82eeaa4b4fbae816686f922d235920e585bc57e1829668"},{"version":"90c482f7c2132fa8fcb44d05e914a9b541b52d7660e7572e7ae69f7fbb1b4541","signature":"bb45e88f8ffd472fe1d183d404e24435f1a3c91dda352362530a4ce3aa6f3a0c"},{"version":"3f7431b9ae7f791fa6a21e289d8b7d0cb43d9e3e2bd40d34a236f2507a57db46","signature":"b9115d738885990a2574782d6b28acd0121d145c5c1ab14593cdb4d7a09fc511"},{"version":"d0f71922ce0d6ce8aecef7b85158c6726e0db4d0ef23d71f2b14b9a2e5bef9fb","signature":"a29a11ea1f06a29ebc9d88a8439d78598d2d4977115a70705902c117d2a19e76"},{"version":"d25b8301aced1d8db8b7456a2a76e9a2cb7f134c0e913f90585a95704de736e6","signature":"d89529fc712f1462709febaee1905cbdcb62a9863fd9b22638b8923eb16be2e9"},{"version":"70a58316dfec322f94bb980c05315faafd93f6fe6c56015efc7f0a4fb87636e2","signature":"d98d28f45f2fd50c72d82ea27d9fb213df06bc2456eb0748c657c6da8e77a1d4"},{"version":"c50d92b66b0b827cca09519452a1bb77dfbbc370b14bc412685d6ed291d33977","signature":"57bd25f9ba4de40de020fb142b4906c3283ed255fa310e20bcf682b2bd938f82"},{"version":"02e0d326f67f99158a21740b1d839fe4f47c88699c74e80f4c80de5cc513b5f0","signature":"e430a8dd3a6948218c1a6bee846325188fe0e0e0ad218cd3e959043c4eb24431"},{"version":"4b138f8cb1344d1062368b0fd0a8b7a4bc38dad34e8515f8333eadfba67fd439","signature":"7c9ecd4cb18a753eaa5001d5dafe992cdd263474b078d006dd945ce9f9f8a112"},{"version":"eaff56964bd490f30099b5ad721e75870c4a032471ce4246e2a9aca2d149a73a","signature":"a214cb7674ea917cd12866a1e973cfa0c674cfb3571b27ab08036d3b58683692"},{"version":"ea48d1f7ba16c713639db5b7ba6d15004ddcad9abb70aa3851a1057a006d29c6","signature":"133c2c646abcef0342babf68388e9c39aeb66a11b98cec91018aa3b32a14689e"},{"version":"f1c9ce005dfab7214e6c57516b25a7c3f6b1523b9a83e6c2fb86368157139391","signature":"1866b8ac774b21b5e2324ea228ec1414753f0abb511fa939256dd5c4024ad754"},{"version":"cbadb93e0efda2ac169da49518530cc1c13f26a1b9dd5850ebef9cc899742c99","signature":"80f5e541cc3f1efd0f44863687cc201993f149d218490bf58b5de53364c704e1"},{"version":"f44be29660d29fd101dd71ea1f7ace66cae61fca94ed3353940c59f666baf914","signature":"b4089a46f3991d019b4ef9a173c78663e9ecfe571261c61f6eb7e90fd59e442d"},{"version":"eb791885d12b9705c35c8703b6b3a49f0bcfdbb96d5a00b8bff5bd222ade45b4","signature":"9689291b32464a65610dd9de9b58e2e0e0fcb9e8cd2a1760b867e72f80601356"},{"version":"c516228d6b75220a25338869ed1aa20cdacd95d1da3d0cde029d1b6cee28f319","signature":"a8507cb07b2b50e1fd4d2a3a198538675a8f13a456ef4dad1c9843e973edbce9"},{"version":"f15931a4c4029a3ca8817875a7e67f16e123dfd5943ea5786c1e17c06a7659f3","signature":"c7200383751f584e39a032d6e50982a633656abcec573deafe15c209712992db"},{"version":"a2243579f8b0ba6f4233adeff78f6d192ccbd22325e8c304acf7c20477cb3372","signature":"4bf9800765ab21c5faf551e72074f12473fe1c6718efc0586188df09359cb234"},{"version":"45e436b76d4ea3d38b63d91f99132327998e13bd2aedb94af8bde80da0ac1cf6","signature":"14311410bc72fc59cd347b676a75f209479bceb0b0294d5a9285ae2746cb79f1"},{"version":"b972ff1ec657ab712203281b96e1a6d5fef2cdb77e72b920df830dd6644f3982","signature":"df2b47efe8bbf54bf494853619ffd0babc181695d4b65adff59d21da82d0312d"},{"version":"ae5b83c9754e8146a88f1e7e1ec82b8ac40589b9541156780068952f21e7b9a2","signature":"09a62f4bbcd618cbbbf19a2bdaf8b08c2dfc17ca71d795f8191dba8e2da7f98b"},{"version":"43501c9d2147c49e15765a559f560f79c87f6e7b83436ba0ea522870df1061e6","signature":"ddfccc296127843c5b204e359ecda0cdb987705c8306722967a889b4a9ba8379"},{"version":"141dac9588bca23bfc8a13b99560bae0cf818733218861bba342a5418e55d86f","signature":"3d58a3363bb571062abeb1fdc96e174e8a6a61bcdd3e7491c2bf65dbb5a17750"},{"version":"1169850a4c64b90116e950c9b1ed1647cc42cdc0406aaef72accb23fa31de94a","signature":"edaa819d2cda320db8a15b0345db7f7589cdc27fd94f8fb464f46677670ac427"},{"version":"37f6203f49f4cc6f5810c37b56f30d37d4374f1e3865010604f093a5b230efd1","signature":"cdb7a8fa8314942d7e149f25242996fbf6f2e7f0e7da19b958726981325b5e91"},{"version":"52f761770e5a798add318d552a80f71d72cc3d6346149b3edefc4bb0cec95c9b","signature":"1a3a6cd1cc20eddc55d13ce8a54fabc0bebe0069b2d75d2c738e7d8aa94741bc"},{"version":"5253453362b3bb0b2d215c3ae66b850edb6f65bce45daaf4f2530b5292ab905b","signature":"9e7fcd385ecfdfa65958f8c734a2a73bbfd1ffca8f5ab0240629464e94f332a0"},{"version":"13e6352373152686a4cb50d944016ae117aba28d7a6c7c0d182bd0ce176c9cce","signature":"be0a97abb04589ab9c8a1186667481e0969e020087416d9eb8bee5cec57f69e3"},{"version":"5062430bb78a002a22e696f31216331490a0847d4bb84a1efac1d32cbaebcc66","signature":"24b3350431697ecdd8ab9b7d96367f8944c2cb8fdfb59043391655c45e5dad8d"},{"version":"1012d17c9bc77cdca9b913d9aa658cddfd9436bfca537dd2a51528262b0f8109","signature":"975d013c31f48ecb26867d0f98f13d2eaebb4af2bfbe6b5fd9a4d38fdccd5656"},{"version":"4f47067f81a6ac0c9ff28cbd5ed810a21ed5e0933db8866c110d044f8d02e855","signature":"36c65fb17300b0e8f2b90fd9a48be672c8342dc101698bcd8ecc3c6aab679e21"},{"version":"101af4aa7dbc1e81255965e9959cf6117f16e8573f61fe853b11cc73a4790640","signature":"58e49c02bb92ca745437c5ce7bd068e11ee2ad1313171db3949b662dfbc04441"},{"version":"5b2927131599d55e0ee730c7a2afc764ff39199a5d186b510fc3eca82f4ef1ff","signature":"d6fc507f1c2ecd14c0882a0e00a1ba2a580c6e45550a3a5e868d7bee4b1922b6"},{"version":"ce8de69cc158052736c206413883472a49b94d182bef19c38430b2da75fe71eb","signature":"c2b8c9951fff3bf59901b9efdae3ddc11b89f77deaeceb66ab299ceeb2737fcd"},{"version":"123953eda79c2e207b266eeb23e32ed233cf3cbbb9022a399189cbf61dfddbbb","signature":"08dccec6fc0c466ee550f9f84b89d88d17ff2b9c80cb3c9f4138e5e60b2c4039"},{"version":"3e11c4733414b0fd622a6c7fb89d19c2218d453e7a8c8c01c4d31310f61b978d","signature":"4e5f8dd5a2c15896f4547444291938881a33044bcfaf82c16a80fb0d7f3441f3"},{"version":"22577c900676846354224462f8a6b3e0e5033cd14a501ea46107e67a4ab7863f","signature":"70fd81e903686acf6e994565edb1588cc619b816646ea1a89ac9a47b45d25737"},{"version":"470e7c461e6c3284465505b0ddc0b240dea9c996845f237144dc6044b0094887","signature":"ee5829ba071cdf53ccbd789a46a4bfb3b85833395fc8361352c0cae454d8e3ad"}],"root":[[59,116]],"options":{"allowImportingTsExtensions":true,"composite":true,"declaration":true,"emitDeclarationOnly":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"module":7,"noFallthroughCasesInSwitch":true,"noImplicitAny":false,"noImplicitReturns":true,"noImplicitThis":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strict":true,"strictBindCallApply":true,"strictFunctionTypes":true,"strictNullChecks":true,"strictPropertyInitialization":true,"target":9,"tsBuildInfoFile":"./tsconfig.tsbuildinfo"},"referencedMap":[[103,1],[94,2],[101,3],[102,4],[116,5],[107,6],[104,7],[105,8],[106,7],[99,9],[61,10],[67,11],[66,12],[65,2],[110,13],[108,14],[63,15],[64,16],[100,17],[98,18],[97,19],[109,20],[96,21],[115,22],[114,23],[113,24],[112,7],[89,25],[72,26],[68,7],[69,7],[70,27],[71,2],[76,28],[80,29],[79,30],[93,31],[92,32],[90,7],[91,2],[81,33],[60,2],[83,34],[85,35],[86,36],[75,37],[74,7],[88,38],[87,39]],"latestChangedDtsFile":"./time/TimeInstantBuilder.d.ts","version":"5.8.3"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { TJsonSerializable } from "../utils/_index.js";
|
|
2
|
-
import { EmptyUpgradeError, UnavailableUpgradeError } from "./errors";
|
|
3
|
-
import { TPossibleFromVersion, TPossibleVersion, TUpgradable, TUpgradeFunction, TVersionMap } from "./types";
|
|
4
|
-
declare const VERSION_FIELD = "$version";
|
|
5
|
-
export interface IDataUpgrader<XStar extends TUpgradable, XLatest extends XStar> {
|
|
6
|
-
upgrade(data: XStar): Promise<XLatest>;
|
|
7
|
-
}
|
|
8
|
-
export declare class DataUpgrader<X extends TUpgradable, XLatest extends X> implements IDataUpgrader<X, XLatest> {
|
|
9
|
-
private latestVersion;
|
|
10
|
-
private transitions;
|
|
11
|
-
private constructor();
|
|
12
|
-
addTransition<XFrom extends TVersionMap<X>[XFromNumber], XTo extends TVersionMap<X>[XToNumber], XFromNumber extends TPossibleFromVersion<X, XLatest>, XToNumber extends Exclude<TPossibleVersion<X>, XFromNumber>>(from: XFromNumber, to: XToNumber, apply: TUpgradeFunction<X, XFrom, XTo>): this;
|
|
13
|
-
upgrade(data: X): Promise<XLatest>;
|
|
14
|
-
isLatestVersion(data: X): data is XLatest;
|
|
15
|
-
static create<X extends TUpgradable, XLatestVersion extends X>(latest: XLatestVersion[typeof VERSION_FIELD]): DataUpgrader<X, XLatestVersion>;
|
|
16
|
-
static Errors: {
|
|
17
|
-
readonly EmptyUpgrade: typeof EmptyUpgradeError;
|
|
18
|
-
readonly UnavailableUpgrade: typeof UnavailableUpgradeError;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
export declare function isUpgradable(obj: TJsonSerializable): obj is TUpgradable;
|
|
22
|
-
export default DataUpgrader;
|
package/dist/upgrade/_index.d.ts
DELETED
package/dist/upgrade/errors.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare class UnavailableUpgradeError<T> extends Error {
|
|
2
|
-
readonly data: T;
|
|
3
|
-
readonly from: number;
|
|
4
|
-
readonly to: number;
|
|
5
|
-
constructor(data: T, from: number, to: number);
|
|
6
|
-
}
|
|
7
|
-
export declare class EmptyUpgradeError<T> extends Error {
|
|
8
|
-
readonly data: T;
|
|
9
|
-
readonly from: number;
|
|
10
|
-
readonly to: number;
|
|
11
|
-
constructor(data: T, from: number, to: number);
|
|
12
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { TMaybe } from "../utils/_index";
|
|
2
|
-
import { TTransition, TTransitionMatrix, TUpgradable } from "./types";
|
|
3
|
-
export default function getTransitionsPath<XStar extends TUpgradable, XFromNumber extends XStar["$version"], XToNumber extends XStar["$version"]>(matrix: TTransitionMatrix<XStar>, from: XFromNumber, to: XToNumber): TMaybe<TTransition<XStar, XFromNumber, XToNumber>[]>;
|
package/dist/upgrade/types.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { TFunction, TJsonObject, TPromisable } from "../utils/_index";
|
|
2
|
-
export type TUpgradable = TJsonObject & {
|
|
3
|
-
$version: number;
|
|
4
|
-
};
|
|
5
|
-
export type TUpgradableAtVersion<XStar extends TUpgradable, N extends XStar["$version"]> = Extract<XStar, {
|
|
6
|
-
$version: N;
|
|
7
|
-
}>;
|
|
8
|
-
export type TVersionMap<XStar extends TUpgradable> = {
|
|
9
|
-
[XVersionNumber in XStar["$version"]]: TUpgradableAtVersion<XStar, XVersionNumber>;
|
|
10
|
-
};
|
|
11
|
-
export type TPossibleVersion<XStar extends TUpgradable> = XStar["$version"] & number;
|
|
12
|
-
export type TPossibleFromVersion<XStar extends TUpgradable, XLatest extends XStar> = Exclude<TPossibleVersion<XStar>, XLatest["$version"]>;
|
|
13
|
-
export type TUpgradeFunction<XStar extends TUpgradable, XFrom extends XStar, XTo extends XStar> = TFunction<Readonly<TVersionMap<XStar>[XFrom["$version"]]>, TPromisable<TVersionMap<XStar>[XTo["$version"]]>>;
|
|
14
|
-
export type TTransition<XStar extends TUpgradable, XFromNumber extends XStar["$version"], XToNumber extends XStar["$version"], XFrom extends Extract<XStar, {
|
|
15
|
-
$version: XFromNumber;
|
|
16
|
-
}> = Extract<XStar, {
|
|
17
|
-
$version: XFromNumber;
|
|
18
|
-
}>, XTo extends Extract<XStar, {
|
|
19
|
-
$version: XToNumber;
|
|
20
|
-
}> = Extract<XStar, {
|
|
21
|
-
$version: XToNumber;
|
|
22
|
-
}>> = {
|
|
23
|
-
from: XFromNumber;
|
|
24
|
-
to: XToNumber;
|
|
25
|
-
apply: TUpgradeFunction<XStar, XFrom, XTo>;
|
|
26
|
-
};
|
|
27
|
-
export type TTransitionMatrix<XStar extends TUpgradable> = Partial<{
|
|
28
|
-
[XTo in XStar["$version"]]: Partial<{
|
|
29
|
-
[XFrom in XStar["$version"]]: TTransition<XStar, XFrom, XTo>;
|
|
30
|
-
}>;
|
|
31
|
-
}>;
|
package/dist/utils/_index.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export * from './arrays.js';
|
|
2
|
-
export * from './booleans.js';
|
|
3
|
-
export { cssDeclarationRulesDictionaryToCss, TCssDeclarationRulesDictionary, TCssSelectorDeclarationRulesDictionary, transformCssDictionary } from './css.js';
|
|
4
|
-
export * from './empties.js';
|
|
5
|
-
export * from './errors.js';
|
|
6
|
-
export * from './functions.js';
|
|
7
|
-
export * from './json.js';
|
|
8
|
-
export * from './nulls.js';
|
|
9
|
-
export * from './numbers.js';
|
|
10
|
-
export * from './operations.js';
|
|
11
|
-
export * from './primitives.js';
|
|
12
|
-
export * from './promises.js';
|
|
13
|
-
export * from './random.js';
|
|
14
|
-
export * from './records.js';
|
|
15
|
-
export * from './strings.js';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { TFunction, TKeysOfType, TReadableArray } from "../_index";
|
|
2
|
-
export declare function groupByString<V, K extends TKeysOfType<V, string>>(arr: TReadableArray<V>, field: K): Record<V[K] & string, V[]>;
|
|
3
|
-
export declare function groupByNumber<V, K extends TKeysOfType<V, number>>(arr: TReadableArray<V>, field: K): Record<V[K] & number, V[]>;
|
|
4
|
-
export declare function groupByBoolean<V, K extends TKeysOfType<V, boolean>>(arr: TReadableArray<V>, field: K): Record<"true" | "false", V[]>;
|
|
5
|
-
export declare function groupBySymbol<V, K extends TKeysOfType<V, symbol>>(arr: TReadableArray<V>, field: K): Record<V[K] & symbol, V[]>;
|
|
6
|
-
export declare function groupByStringWith<V, K extends string>(arr: TReadableArray<V>, getter: TFunction<V, K>): Record<K, V[]>;
|
|
7
|
-
export declare function groupByNumberWith<V, K extends number>(arr: TReadableArray<V>, getter: TFunction<V, K>): Record<K, V[]>;
|
|
8
|
-
export declare function groupByBooleanWith<V, K extends boolean>(arr: TReadableArray<V>, getter: TFunction<V, K>): Record<"true" | "false", V[]>;
|
|
9
|
-
export declare function groupBySymbolWith<V, K extends symbol>(arr: TReadableArray<V>, getter: TFunction<V, K>): Record<K, V[]>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TFunction, TKeysOfType } from "../_index";
|
|
2
|
-
export declare function indexByString<V, K extends TKeysOfType<V, string>>(arr: V[], field: K): Record<V[K] & string, V>;
|
|
3
|
-
export declare function indexByNumber<V, K extends TKeysOfType<V, number>>(arr: V[], field: K): Record<V[K] & number, V>;
|
|
4
|
-
export declare function indexBySymbol<V, K extends TKeysOfType<V, symbol>>(arr: V[], field: K): Record<V[K] & symbol, V>;
|
|
5
|
-
export declare function indexByStringWith<V>(arr: V[], getter: TFunction<V, string>): Record<string, V>;
|
|
6
|
-
export declare function indexByNumberWith<V>(arr: V[], getter: TFunction<V, number>): Record<number, V>;
|
|
7
|
-
export declare function indexBySymbolWith<V>(arr: V[], getter: TFunction<V, symbol>): Record<symbol, V>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { TReadableArray } from "../arrays.js";
|
|
2
|
-
export declare function average(arr: TReadableArray<number>): number;
|
|
3
|
-
export declare function sum(arr: TReadableArray<number>): number;
|
|
4
|
-
export declare function sumBy<T>(arr: TReadableArray<T>, getter: (t: T) => number): number;
|
|
5
|
-
export declare function min(arr: TReadableArray<number>): number;
|
|
6
|
-
export declare function minBy<T>(arr: TReadableArray<T>, getter: (t: T) => number): number;
|
|
7
|
-
export declare function max(arr: TReadableArray<number>): number;
|
|
8
|
-
export declare function maxBy<T>(arr: TReadableArray<T>, getter: (t: T) => number): number;
|