@evolu/common 8.8.0 → 8.10.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.
- package/dist/src/Assert.d.ts +21 -1
- package/dist/src/Assert.d.ts.map +1 -1
- package/dist/src/Assert.js +31 -27
- package/dist/src/Bytes.d.ts +647 -0
- package/dist/src/Bytes.d.ts.map +1 -0
- package/dist/src/{Binary.js → Bytes.js} +266 -16
- package/dist/src/Config.d.ts +142 -0
- package/dist/src/Config.d.ts.map +1 -0
- package/dist/src/Config.js +181 -0
- package/dist/src/Fs.d.ts +302 -0
- package/dist/src/Fs.d.ts.map +1 -0
- package/dist/src/Fs.js +111 -0
- package/dist/src/Number.d.ts +50 -7
- package/dist/src/Number.d.ts.map +1 -1
- package/dist/src/Number.js +47 -8
- package/dist/src/Object.d.ts +32 -0
- package/dist/src/Object.d.ts.map +1 -1
- package/dist/src/Object.js +41 -0
- package/dist/src/Polyfills.d.ts +6 -0
- package/dist/src/Polyfills.d.ts.map +1 -1
- package/dist/src/Polyfills.js +6 -0
- package/dist/src/Sqlite.js +1 -1
- package/dist/src/Time.d.ts +74 -12
- package/dist/src/Time.d.ts.map +1 -1
- package/dist/src/Time.js +40 -2
- package/dist/src/Type.d.ts +1451 -79
- package/dist/src/Type.d.ts.map +1 -1
- package/dist/src/Type.js +1303 -96
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -1
- package/dist/src/intl/_en.d.ts +24 -1
- package/dist/src/intl/_en.d.ts.map +1 -1
- package/dist/src/intl/_en.js +20 -0
- package/dist/src/intl/ar.d.ts +24 -1
- package/dist/src/intl/ar.d.ts.map +1 -1
- package/dist/src/intl/ar.js +20 -0
- package/dist/src/intl/bn.d.ts +24 -1
- package/dist/src/intl/bn.d.ts.map +1 -1
- package/dist/src/intl/bn.js +20 -0
- package/dist/src/intl/ca.d.ts +24 -1
- package/dist/src/intl/ca.d.ts.map +1 -1
- package/dist/src/intl/ca.js +20 -0
- package/dist/src/intl/cs.d.ts +24 -1
- package/dist/src/intl/cs.d.ts.map +1 -1
- package/dist/src/intl/cs.js +20 -0
- package/dist/src/intl/da.d.ts +24 -1
- package/dist/src/intl/da.d.ts.map +1 -1
- package/dist/src/intl/da.js +20 -0
- package/dist/src/intl/de.d.ts +24 -1
- package/dist/src/intl/de.d.ts.map +1 -1
- package/dist/src/intl/de.js +20 -0
- package/dist/src/intl/el.d.ts +24 -1
- package/dist/src/intl/el.d.ts.map +1 -1
- package/dist/src/intl/el.js +20 -0
- package/dist/src/intl/es.d.ts +24 -1
- package/dist/src/intl/es.d.ts.map +1 -1
- package/dist/src/intl/es.js +20 -0
- package/dist/src/intl/fa.d.ts +24 -1
- package/dist/src/intl/fa.d.ts.map +1 -1
- package/dist/src/intl/fa.js +20 -0
- package/dist/src/intl/fi.d.ts +24 -1
- package/dist/src/intl/fi.d.ts.map +1 -1
- package/dist/src/intl/fi.js +20 -0
- package/dist/src/intl/fil.d.ts +24 -1
- package/dist/src/intl/fil.d.ts.map +1 -1
- package/dist/src/intl/fil.js +20 -0
- package/dist/src/intl/fr.d.ts +24 -1
- package/dist/src/intl/fr.d.ts.map +1 -1
- package/dist/src/intl/fr.js +20 -0
- package/dist/src/intl/he.d.ts +24 -1
- package/dist/src/intl/he.d.ts.map +1 -1
- package/dist/src/intl/he.js +20 -0
- package/dist/src/intl/hi.d.ts +24 -1
- package/dist/src/intl/hi.d.ts.map +1 -1
- package/dist/src/intl/hi.js +20 -0
- package/dist/src/intl/hr.d.ts +24 -1
- package/dist/src/intl/hr.d.ts.map +1 -1
- package/dist/src/intl/hr.js +20 -0
- package/dist/src/intl/hu.d.ts +22 -1
- package/dist/src/intl/hu.d.ts.map +1 -1
- package/dist/src/intl/hu.js +18 -0
- package/dist/src/intl/id.d.ts +24 -1
- package/dist/src/intl/id.d.ts.map +1 -1
- package/dist/src/intl/id.js +20 -0
- package/dist/src/intl/it.d.ts +24 -1
- package/dist/src/intl/it.d.ts.map +1 -1
- package/dist/src/intl/it.js +20 -0
- package/dist/src/intl/ja.d.ts +24 -1
- package/dist/src/intl/ja.d.ts.map +1 -1
- package/dist/src/intl/ja.js +20 -0
- package/dist/src/intl/ko.d.ts +24 -1
- package/dist/src/intl/ko.d.ts.map +1 -1
- package/dist/src/intl/ko.js +20 -0
- package/dist/src/intl/ml.d.ts +24 -1
- package/dist/src/intl/ml.d.ts.map +1 -1
- package/dist/src/intl/ml.js +20 -0
- package/dist/src/intl/mr.d.ts +24 -1
- package/dist/src/intl/mr.d.ts.map +1 -1
- package/dist/src/intl/mr.js +20 -0
- package/dist/src/intl/ms.d.ts +24 -1
- package/dist/src/intl/ms.d.ts.map +1 -1
- package/dist/src/intl/ms.js +20 -0
- package/dist/src/intl/nb.d.ts +22 -1
- package/dist/src/intl/nb.d.ts.map +1 -1
- package/dist/src/intl/nb.js +18 -0
- package/dist/src/intl/nl.d.ts +24 -1
- package/dist/src/intl/nl.d.ts.map +1 -1
- package/dist/src/intl/nl.js +20 -0
- package/dist/src/intl/pa.d.ts +24 -1
- package/dist/src/intl/pa.d.ts.map +1 -1
- package/dist/src/intl/pa.js +20 -0
- package/dist/src/intl/pl.d.ts +23 -0
- package/dist/src/intl/pl.d.ts.map +1 -1
- package/dist/src/intl/pl.js +20 -0
- package/dist/src/intl/pt-BR.d.ts +24 -1
- package/dist/src/intl/pt-BR.d.ts.map +1 -1
- package/dist/src/intl/pt-BR.js +20 -0
- package/dist/src/intl/pt.d.ts +24 -1
- package/dist/src/intl/pt.d.ts.map +1 -1
- package/dist/src/intl/pt.js +20 -0
- package/dist/src/intl/ro.d.ts +24 -1
- package/dist/src/intl/ro.d.ts.map +1 -1
- package/dist/src/intl/ro.js +20 -0
- package/dist/src/intl/sk.d.ts +24 -1
- package/dist/src/intl/sk.d.ts.map +1 -1
- package/dist/src/intl/sk.js +20 -0
- package/dist/src/intl/sl.d.ts +24 -1
- package/dist/src/intl/sl.d.ts.map +1 -1
- package/dist/src/intl/sl.js +20 -0
- package/dist/src/intl/sv.d.ts +24 -1
- package/dist/src/intl/sv.d.ts.map +1 -1
- package/dist/src/intl/sv.js +20 -0
- package/dist/src/intl/sw.d.ts +21 -0
- package/dist/src/intl/sw.d.ts.map +1 -1
- package/dist/src/intl/sw.js +18 -0
- package/dist/src/intl/ta.d.ts +24 -1
- package/dist/src/intl/ta.d.ts.map +1 -1
- package/dist/src/intl/ta.js +20 -0
- package/dist/src/intl/te.d.ts +24 -1
- package/dist/src/intl/te.d.ts.map +1 -1
- package/dist/src/intl/te.js +20 -0
- package/dist/src/intl/th.d.ts +24 -1
- package/dist/src/intl/th.d.ts.map +1 -1
- package/dist/src/intl/th.js +20 -0
- package/dist/src/intl/tr.d.ts +24 -1
- package/dist/src/intl/tr.d.ts.map +1 -1
- package/dist/src/intl/tr.js +20 -0
- package/dist/src/intl/uk.d.ts +80 -57
- package/dist/src/intl/uk.d.ts.map +1 -1
- package/dist/src/intl/uk.js +174 -149
- package/dist/src/intl/ur.d.ts +24 -1
- package/dist/src/intl/ur.d.ts.map +1 -1
- package/dist/src/intl/ur.js +20 -0
- package/dist/src/intl/vi.d.ts +24 -1
- package/dist/src/intl/vi.d.ts.map +1 -1
- package/dist/src/intl/vi.js +20 -0
- package/dist/src/intl/zh-CN.d.ts +24 -1
- package/dist/src/intl/zh-CN.d.ts.map +1 -1
- package/dist/src/intl/zh-CN.js +20 -0
- package/dist/src/intl/zh-TW.d.ts +24 -1
- package/dist/src/intl/zh-TW.d.ts.map +1 -1
- package/dist/src/intl/zh-TW.js +20 -0
- package/dist/src/local-first/Protocol.d.ts +1 -1
- package/dist/src/local-first/Protocol.d.ts.map +1 -1
- package/dist/src/local-first/Protocol.js +1 -1
- package/dist/src/local-first/Schema.d.ts +10 -0
- package/dist/src/local-first/Schema.d.ts.map +1 -1
- package/dist/src/local-first/Storage.js +1 -1
- package/dist/src/local-first/Timestamp.js +1 -1
- package/package.json +1 -1
- package/src/Assert.test.ts +51 -0
- package/src/Assert.ts +56 -4
- package/src/{Binary.test.ts → Bytes.test.ts} +286 -1
- package/src/{Binary.ts → Bytes.ts} +652 -21
- package/src/Config.test.ts +672 -0
- package/src/Config.ts +410 -0
- package/src/Fs.test.ts +105 -0
- package/src/Fs.ts +414 -0
- package/src/Number.test.ts +82 -18
- package/src/Number.ts +76 -8
- package/src/Object.test.ts +115 -1
- package/src/Object.ts +44 -0
- package/src/Polyfills.ts +6 -0
- package/src/Sqlite.ts +1 -1
- package/src/Time.test.ts +82 -11
- package/src/Time.ts +141 -16
- package/src/Type.test.ts +3114 -157
- package/src/Type.ts +2553 -196
- package/src/index.ts +3 -1
- package/src/intl/_en.ts +70 -0
- package/src/intl/ar.ts +71 -0
- package/src/intl/bn.ts +70 -0
- package/src/intl/ca.ts +70 -0
- package/src/intl/cs.ts +70 -0
- package/src/intl/da.ts +70 -0
- package/src/intl/de.ts +70 -0
- package/src/intl/el.ts +70 -0
- package/src/intl/es.ts +70 -0
- package/src/intl/fa.ts +70 -0
- package/src/intl/fi.ts +70 -0
- package/src/intl/fil.ts +70 -0
- package/src/intl/fr.ts +70 -0
- package/src/intl/he.ts +70 -0
- package/src/intl/hi.ts +70 -0
- package/src/intl/hr.ts +70 -0
- package/src/intl/hu.ts +69 -0
- package/src/intl/id.ts +70 -0
- package/src/intl/intl.test.ts +819 -1
- package/src/intl/it.ts +70 -0
- package/src/intl/ja.ts +70 -0
- package/src/intl/ko.ts +68 -0
- package/src/intl/ml.ts +70 -0
- package/src/intl/mr.ts +70 -0
- package/src/intl/ms.ts +71 -0
- package/src/intl/nb.ts +69 -0
- package/src/intl/nl.ts +70 -0
- package/src/intl/pa.ts +70 -0
- package/src/intl/pl.ts +63 -0
- package/src/intl/pt-BR.ts +70 -0
- package/src/intl/pt.ts +71 -0
- package/src/intl/ro.ts +70 -0
- package/src/intl/sk.ts +71 -0
- package/src/intl/sl.ts +70 -0
- package/src/intl/sv.ts +70 -0
- package/src/intl/sw.ts +62 -0
- package/src/intl/ta.ts +70 -0
- package/src/intl/te.ts +70 -0
- package/src/intl/th.ts +68 -0
- package/src/intl/tr.ts +70 -0
- package/src/intl/uk.ts +228 -155
- package/src/intl/ur.ts +70 -0
- package/src/intl/vi.ts +70 -0
- package/src/intl/zh-CN.ts +68 -0
- package/src/intl/zh-TW.ts +68 -0
- package/src/local-first/Protocol.test.ts +1 -1
- package/src/local-first/Protocol.ts +1 -1
- package/src/local-first/Schema.ts +11 -0
- package/src/local-first/Storage.ts +1 -1
- package/src/local-first/Timestamp.ts +1 -1
- package/dist/src/Binary.d.ts +0 -254
- package/dist/src/Binary.d.ts.map +0 -1
package/src/intl/hr.ts
CHANGED
|
@@ -4,13 +4,21 @@
|
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type { DurationLiteralError } from "../Time.ts";
|
|
8
|
+
import type { PercentageLiteralError } from "../Number.ts";
|
|
9
|
+
import type { ByteSizeLiteralError } from "../Bytes.ts";
|
|
7
10
|
import { assertNonNullable } from "../Assert.ts";
|
|
8
11
|
import { safelyStringifyUnknownValue } from "../String.ts";
|
|
9
12
|
import type {
|
|
10
13
|
ArrayError,
|
|
11
14
|
Base64UrlError,
|
|
15
|
+
BooleanFromStringError,
|
|
12
16
|
BetweenError,
|
|
17
|
+
IdentifierError,
|
|
13
18
|
CapitalizedError,
|
|
19
|
+
UncapitalizedError,
|
|
20
|
+
UppercasedError,
|
|
21
|
+
LowercasedError,
|
|
14
22
|
DateIsoError,
|
|
15
23
|
DateIsoFromDateError,
|
|
16
24
|
DecimalStringError,
|
|
@@ -23,6 +31,7 @@ import type {
|
|
|
23
31
|
Int64Error,
|
|
24
32
|
Int64StringError,
|
|
25
33
|
IntError,
|
|
34
|
+
IntFromStringError,
|
|
26
35
|
IdError,
|
|
27
36
|
JsonError,
|
|
28
37
|
JsonValueError,
|
|
@@ -56,6 +65,7 @@ import type {
|
|
|
56
65
|
SetError,
|
|
57
66
|
TableIdError,
|
|
58
67
|
TemplateLiteralError,
|
|
68
|
+
StartsWithError,
|
|
59
69
|
TrimmedError,
|
|
60
70
|
TupleElementsError,
|
|
61
71
|
TupleError,
|
|
@@ -117,6 +127,12 @@ export const formatBigIntError: TypeErrorFormatter<TypeOfError<"BigInt">> =
|
|
|
117
127
|
export const formatBooleanError: TypeErrorFormatter<TypeOfError<"Boolean">> =
|
|
118
128
|
formatTypeOfError;
|
|
119
129
|
|
|
130
|
+
/** Formats a BooleanFromStringError in Croatian. */
|
|
131
|
+
export const formatBooleanFromStringError: TypeErrorFormatter<
|
|
132
|
+
BooleanFromStringError
|
|
133
|
+
> = (error) =>
|
|
134
|
+
`Vrijednost ${safelyStringifyUnknownValue(error.value)} nije logička vrijednost. Upotrijebite true ili false.`;
|
|
135
|
+
|
|
120
136
|
/** Formats a Symbol TypeOfError in Croatian. */
|
|
121
137
|
export const formatSymbolError: TypeErrorFormatter<TypeOfError<"Symbol">> =
|
|
122
138
|
formatTypeOfError;
|
|
@@ -179,16 +195,46 @@ export const formatInt64StringError: TypeErrorFormatter<Int64StringError> = (
|
|
|
179
195
|
) =>
|
|
180
196
|
`Vrijednost ${safelyStringifyUnknownValue(error.value)} nije valjani Int64 niz.`;
|
|
181
197
|
|
|
198
|
+
/** Formats an IdentifierError in Croatian. */
|
|
199
|
+
export const formatIdentifierError: TypeErrorFormatter<IdentifierError> = (
|
|
200
|
+
error,
|
|
201
|
+
) =>
|
|
202
|
+
`Vrijednost ${safelyStringifyUnknownValue(error.value)} nije identifikator u formatu ${error.casing}.`;
|
|
203
|
+
|
|
182
204
|
/** Formats a CapitalizedError in Croatian. */
|
|
183
205
|
export const formatCapitalizedError: TypeErrorFormatter<CapitalizedError> = (
|
|
184
206
|
error,
|
|
185
207
|
) =>
|
|
186
208
|
`Vrijednost ${safelyStringifyUnknownValue(error.value)} mora počinjati velikim slovom.`;
|
|
187
209
|
|
|
210
|
+
/** Formats an UncapitalizedError in Croatian. */
|
|
211
|
+
export const formatUncapitalizedError: TypeErrorFormatter<
|
|
212
|
+
UncapitalizedError
|
|
213
|
+
> = (error) =>
|
|
214
|
+
`Vrijednost ${safelyStringifyUnknownValue(error.value)} ne smije počinjati velikim slovom.`;
|
|
215
|
+
|
|
216
|
+
/** Formats an UppercasedError in Croatian. */
|
|
217
|
+
export const formatUppercasedError: TypeErrorFormatter<UppercasedError> = (
|
|
218
|
+
error,
|
|
219
|
+
) =>
|
|
220
|
+
`Vrijednost ${safelyStringifyUnknownValue(error.value)} mora biti napisana velikim slovima.`;
|
|
221
|
+
|
|
222
|
+
/** Formats a LowercasedError in Croatian. */
|
|
223
|
+
export const formatLowercasedError: TypeErrorFormatter<LowercasedError> = (
|
|
224
|
+
error,
|
|
225
|
+
) =>
|
|
226
|
+
`Vrijednost ${safelyStringifyUnknownValue(error.value)} mora biti napisana malim slovima.`;
|
|
227
|
+
|
|
188
228
|
/** Formats a TrimmedError in Croatian. */
|
|
189
229
|
export const formatTrimmedError: TypeErrorFormatter<TrimmedError> = (error) =>
|
|
190
230
|
`Vrijednost ${safelyStringifyUnknownValue(error.value)} ne smije imati razmake na početku ni na kraju.`;
|
|
191
231
|
|
|
232
|
+
/** Formats a StartsWithError in Croatian. */
|
|
233
|
+
export const formatStartsWithError: TypeErrorFormatter<StartsWithError> = (
|
|
234
|
+
error,
|
|
235
|
+
) =>
|
|
236
|
+
`Vrijednost ${safelyStringifyUnknownValue(error.value)} mora počinjati s ${safelyStringifyUnknownValue(error.prefix)}.`;
|
|
237
|
+
|
|
192
238
|
/** Formats a MinLengthError in Croatian. */
|
|
193
239
|
export const formatMinLengthError: TypeErrorFormatter<MinLengthError> = (
|
|
194
240
|
error,
|
|
@@ -279,6 +325,12 @@ export const formatNegativeDecimalStringError: TypeErrorFormatter<
|
|
|
279
325
|
export const formatIntError: TypeErrorFormatter<IntError> = (error) =>
|
|
280
326
|
`Vrijednost ${safelyStringifyUnknownValue(error.value)} mora biti siguran cijeli broj.`;
|
|
281
327
|
|
|
328
|
+
/** Formats an IntFromStringError in Croatian. */
|
|
329
|
+
export const formatIntFromStringError: TypeErrorFormatter<
|
|
330
|
+
IntFromStringError
|
|
331
|
+
> = (error) =>
|
|
332
|
+
`Vrijednost ${safelyStringifyUnknownValue(error.value)} nije decimalni cijeli broj.`;
|
|
333
|
+
|
|
282
334
|
/** Formats a GreaterThanError in Croatian. */
|
|
283
335
|
export const formatGreaterThanError: TypeErrorFormatter<GreaterThanError> = (
|
|
284
336
|
error,
|
|
@@ -507,3 +559,21 @@ export const formatJsonValueError: TypeErrorFormatter<JsonValueError> = (
|
|
|
507
559
|
/** Formats a JsonError in Croatian. */
|
|
508
560
|
export const formatJsonError: TypeErrorFormatter<JsonError> = (error) =>
|
|
509
561
|
`Vrijednost ${safelyStringifyUnknownValue(error.value)} ne može se analizirati kao JsonValue.`;
|
|
562
|
+
|
|
563
|
+
/** Formats a {@link ByteSizeLiteralError}. */
|
|
564
|
+
export const formatByteSizeLiteralError: TypeErrorFormatter<
|
|
565
|
+
ByteSizeLiteralError
|
|
566
|
+
> = (error) =>
|
|
567
|
+
`Vrijednost ${safelyStringifyUnknownValue(error.value)} nije literal veličine u bajtovima. Upotrijebite vrijednost poput "512KiB" ili "1MiB".`;
|
|
568
|
+
|
|
569
|
+
/** Formats a {@link DurationLiteralError}. */
|
|
570
|
+
export const formatDurationLiteralError: TypeErrorFormatter<
|
|
571
|
+
DurationLiteralError
|
|
572
|
+
> = (error) =>
|
|
573
|
+
`Vrijednost ${safelyStringifyUnknownValue(error.value)} nije literal trajanja. Upotrijebite vrijednost poput "500ms" ili "1.5s".`;
|
|
574
|
+
|
|
575
|
+
/** Formats a {@link PercentageLiteralError}. */
|
|
576
|
+
export const formatPercentageLiteralError: TypeErrorFormatter<
|
|
577
|
+
PercentageLiteralError
|
|
578
|
+
> = (error) =>
|
|
579
|
+
`Vrijednost ${safelyStringifyUnknownValue(error.value)} nije literal postotka. Upotrijebite vrijednost poput "50%" ili "12.5%".`;
|
package/src/intl/hu.ts
CHANGED
|
@@ -4,13 +4,21 @@
|
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type { DurationLiteralError } from "../Time.ts";
|
|
8
|
+
import type { PercentageLiteralError } from "../Number.ts";
|
|
9
|
+
import type { ByteSizeLiteralError } from "../Bytes.ts";
|
|
7
10
|
import { assertNonNullable } from "../Assert.ts";
|
|
8
11
|
import { safelyStringifyUnknownValue } from "../String.ts";
|
|
9
12
|
import type {
|
|
10
13
|
ArrayError,
|
|
11
14
|
Base64UrlError,
|
|
15
|
+
BooleanFromStringError,
|
|
12
16
|
BetweenError,
|
|
17
|
+
IdentifierError,
|
|
13
18
|
CapitalizedError,
|
|
19
|
+
UncapitalizedError,
|
|
20
|
+
UppercasedError,
|
|
21
|
+
LowercasedError,
|
|
14
22
|
DateIsoError,
|
|
15
23
|
DateIsoFromDateError,
|
|
16
24
|
DecimalStringError,
|
|
@@ -23,6 +31,7 @@ import type {
|
|
|
23
31
|
Int64Error,
|
|
24
32
|
Int64StringError,
|
|
25
33
|
IntError,
|
|
34
|
+
IntFromStringError,
|
|
26
35
|
IdError,
|
|
27
36
|
JsonError,
|
|
28
37
|
JsonValueError,
|
|
@@ -56,6 +65,7 @@ import type {
|
|
|
56
65
|
SetError,
|
|
57
66
|
TableIdError,
|
|
58
67
|
TemplateLiteralError,
|
|
68
|
+
StartsWithError,
|
|
59
69
|
TrimmedError,
|
|
60
70
|
TupleElementsError,
|
|
61
71
|
TupleError,
|
|
@@ -135,12 +145,43 @@ export const formatInt64StringError: TypeErrorFormatter<Int64StringError> = (
|
|
|
135
145
|
error,
|
|
136
146
|
) =>
|
|
137
147
|
`A(z) ${safelyStringifyUnknownValue(error.value)} érték nem érvényes Int64 karakterlánc.`;
|
|
148
|
+
|
|
149
|
+
/** Formats an IdentifierError in Hungarian. */
|
|
150
|
+
export const formatIdentifierError: TypeErrorFormatter<IdentifierError> = (
|
|
151
|
+
error,
|
|
152
|
+
) =>
|
|
153
|
+
`A(z) ${safelyStringifyUnknownValue(error.value)} érték nem ${error.casing} azonosító.`;
|
|
154
|
+
|
|
138
155
|
export const formatCapitalizedError: TypeErrorFormatter<CapitalizedError> = (
|
|
139
156
|
error,
|
|
140
157
|
) =>
|
|
141
158
|
`A(z) ${safelyStringifyUnknownValue(error.value)} értéknek nagybetűvel kell kezdődnie.`;
|
|
159
|
+
|
|
160
|
+
/** Formats an UncapitalizedError in Hungarian. */
|
|
161
|
+
export const formatUncapitalizedError: TypeErrorFormatter<
|
|
162
|
+
UncapitalizedError
|
|
163
|
+
> = (error) =>
|
|
164
|
+
`A(z) ${safelyStringifyUnknownValue(error.value)} érték nem kezdődhet nagybetűvel.`;
|
|
165
|
+
|
|
166
|
+
/** Formats an UppercasedError in Hungarian. */
|
|
167
|
+
export const formatUppercasedError: TypeErrorFormatter<UppercasedError> = (
|
|
168
|
+
error,
|
|
169
|
+
) =>
|
|
170
|
+
`A(z) ${safelyStringifyUnknownValue(error.value)} értéknek nagybetűsnek kell lennie.`;
|
|
171
|
+
|
|
172
|
+
/** Formats a LowercasedError in Hungarian. */
|
|
173
|
+
export const formatLowercasedError: TypeErrorFormatter<LowercasedError> = (
|
|
174
|
+
error,
|
|
175
|
+
) =>
|
|
176
|
+
`A(z) ${safelyStringifyUnknownValue(error.value)} értéknek kisbetűsnek kell lennie.`;
|
|
142
177
|
export const formatTrimmedError: TypeErrorFormatter<TrimmedError> = (error) =>
|
|
143
178
|
`A(z) ${safelyStringifyUnknownValue(error.value)} értéknek nem lehetnek kezdő vagy záró szóközei.`;
|
|
179
|
+
/** Formats a StartsWithError in Hungarian. */
|
|
180
|
+
export const formatStartsWithError: TypeErrorFormatter<StartsWithError> = (
|
|
181
|
+
error,
|
|
182
|
+
) =>
|
|
183
|
+
`A(z) ${safelyStringifyUnknownValue(error.value)} értéknek a(z) ${safelyStringifyUnknownValue(error.prefix)} előtaggal kell kezdődnie.`;
|
|
184
|
+
|
|
144
185
|
export const formatMinLengthError: TypeErrorFormatter<MinLengthError> = (
|
|
145
186
|
error,
|
|
146
187
|
) =>
|
|
@@ -220,6 +261,16 @@ export const formatMultipleOfError: TypeErrorFormatter<MultipleOfError> = (
|
|
|
220
261
|
export const formatBetweenError: TypeErrorFormatter<BetweenError> = (error) =>
|
|
221
262
|
`A(z) ${safelyStringifyUnknownValue(error.value)} értéknek ${error.min} és ${error.max} között kell lennie, a határokat is beleértve.`;
|
|
222
263
|
|
|
264
|
+
export const formatBooleanFromStringError: TypeErrorFormatter<
|
|
265
|
+
BooleanFromStringError
|
|
266
|
+
> = (error) =>
|
|
267
|
+
`A(z) ${safelyStringifyUnknownValue(error.value)} érték nem logikai érték. Használja a true vagy false értéket.`;
|
|
268
|
+
|
|
269
|
+
export const formatIntFromStringError: TypeErrorFormatter<
|
|
270
|
+
IntFromStringError
|
|
271
|
+
> = (error) =>
|
|
272
|
+
`A(z) ${safelyStringifyUnknownValue(error.value)} érték nem decimális egész szám.`;
|
|
273
|
+
|
|
223
274
|
export const formatArrayError: TypeErrorFormatter<ArrayError> = (error) => {
|
|
224
275
|
if (error.reason.kind === "NotArray") {
|
|
225
276
|
return `A(z) ${safelyStringifyUnknownValue(error.reason.value)} érték nem tömb.`;
|
|
@@ -399,3 +450,21 @@ export const formatJsonValueError: TypeErrorFormatter<JsonValueError> = (
|
|
|
399
450
|
|
|
400
451
|
export const formatJsonError: TypeErrorFormatter<JsonError> = (error) =>
|
|
401
452
|
`A(z) ${safelyStringifyUnknownValue(error.value)} érték nem elemezhető JsonValue-vá.`;
|
|
453
|
+
|
|
454
|
+
/** Formats a {@link ByteSizeLiteralError}. */
|
|
455
|
+
export const formatByteSizeLiteralError: TypeErrorFormatter<
|
|
456
|
+
ByteSizeLiteralError
|
|
457
|
+
> = (error) =>
|
|
458
|
+
`A(z) ${safelyStringifyUnknownValue(error.value)} érték nem bájtméret-literál. Használjon például "512KiB" vagy "1MiB" értéket.`;
|
|
459
|
+
|
|
460
|
+
/** Formats a {@link DurationLiteralError}. */
|
|
461
|
+
export const formatDurationLiteralError: TypeErrorFormatter<
|
|
462
|
+
DurationLiteralError
|
|
463
|
+
> = (error) =>
|
|
464
|
+
`A(z) ${safelyStringifyUnknownValue(error.value)} érték nem időtartam-literál. Használjon például "500ms" vagy "1.5s" értéket.`;
|
|
465
|
+
|
|
466
|
+
/** Formats a {@link PercentageLiteralError}. */
|
|
467
|
+
export const formatPercentageLiteralError: TypeErrorFormatter<
|
|
468
|
+
PercentageLiteralError
|
|
469
|
+
> = (error) =>
|
|
470
|
+
`A(z) ${safelyStringifyUnknownValue(error.value)} érték nem százalékliterál. Használjon például "50%" vagy "12.5%" értéket.`;
|
package/src/intl/id.ts
CHANGED
|
@@ -4,13 +4,21 @@
|
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type { DurationLiteralError } from "../Time.ts";
|
|
8
|
+
import type { PercentageLiteralError } from "../Number.ts";
|
|
9
|
+
import type { ByteSizeLiteralError } from "../Bytes.ts";
|
|
7
10
|
import { assertNonNullable } from "../Assert.ts";
|
|
8
11
|
import { safelyStringifyUnknownValue } from "../String.ts";
|
|
9
12
|
import type {
|
|
10
13
|
ArrayError,
|
|
11
14
|
Base64UrlError,
|
|
15
|
+
BooleanFromStringError,
|
|
12
16
|
BetweenError,
|
|
17
|
+
IdentifierError,
|
|
13
18
|
CapitalizedError,
|
|
19
|
+
UncapitalizedError,
|
|
20
|
+
UppercasedError,
|
|
21
|
+
LowercasedError,
|
|
14
22
|
DateIsoError,
|
|
15
23
|
DateIsoFromDateError,
|
|
16
24
|
DecimalStringError,
|
|
@@ -23,6 +31,7 @@ import type {
|
|
|
23
31
|
Int64Error,
|
|
24
32
|
Int64StringError,
|
|
25
33
|
IntError,
|
|
34
|
+
IntFromStringError,
|
|
26
35
|
IdError,
|
|
27
36
|
JsonError,
|
|
28
37
|
JsonValueError,
|
|
@@ -56,6 +65,7 @@ import type {
|
|
|
56
65
|
SetError,
|
|
57
66
|
TableIdError,
|
|
58
67
|
TemplateLiteralError,
|
|
68
|
+
StartsWithError,
|
|
59
69
|
TrimmedError,
|
|
60
70
|
TupleElementsError,
|
|
61
71
|
TupleError,
|
|
@@ -110,6 +120,12 @@ export const formatBigIntError: TypeErrorFormatter<TypeOfError<"BigInt">> =
|
|
|
110
120
|
export const formatBooleanError: TypeErrorFormatter<TypeOfError<"Boolean">> =
|
|
111
121
|
formatTypeOfError;
|
|
112
122
|
|
|
123
|
+
/** Formats a BooleanFromStringError in Indonesian. */
|
|
124
|
+
export const formatBooleanFromStringError: TypeErrorFormatter<
|
|
125
|
+
BooleanFromStringError
|
|
126
|
+
> = (error) =>
|
|
127
|
+
`Nilai ${safelyStringifyUnknownValue(error.value)} bukan boolean. Gunakan true atau false.`;
|
|
128
|
+
|
|
113
129
|
/** Formats a Symbol TypeOfError in Indonesian. */
|
|
114
130
|
export const formatSymbolError: TypeErrorFormatter<TypeOfError<"Symbol">> =
|
|
115
131
|
formatTypeOfError;
|
|
@@ -172,16 +188,46 @@ export const formatInt64StringError: TypeErrorFormatter<Int64StringError> = (
|
|
|
172
188
|
) =>
|
|
173
189
|
`Nilai ${safelyStringifyUnknownValue(error.value)} bukan string Int64 yang valid.`;
|
|
174
190
|
|
|
191
|
+
/** Formats an IdentifierError in Indonesian. */
|
|
192
|
+
export const formatIdentifierError: TypeErrorFormatter<IdentifierError> = (
|
|
193
|
+
error,
|
|
194
|
+
) =>
|
|
195
|
+
`Nilai ${safelyStringifyUnknownValue(error.value)} bukan pengenal ${error.casing}.`;
|
|
196
|
+
|
|
175
197
|
/** Formats a CapitalizedError in Indonesian. */
|
|
176
198
|
export const formatCapitalizedError: TypeErrorFormatter<CapitalizedError> = (
|
|
177
199
|
error,
|
|
178
200
|
) =>
|
|
179
201
|
`Nilai ${safelyStringifyUnknownValue(error.value)} harus menggunakan huruf kapital di awal.`;
|
|
180
202
|
|
|
203
|
+
/** Formats an UncapitalizedError in Indonesian. */
|
|
204
|
+
export const formatUncapitalizedError: TypeErrorFormatter<
|
|
205
|
+
UncapitalizedError
|
|
206
|
+
> = (error) =>
|
|
207
|
+
`Nilai ${safelyStringifyUnknownValue(error.value)} tidak boleh diawali dengan huruf besar.`;
|
|
208
|
+
|
|
209
|
+
/** Formats an UppercasedError in Indonesian. */
|
|
210
|
+
export const formatUppercasedError: TypeErrorFormatter<UppercasedError> = (
|
|
211
|
+
error,
|
|
212
|
+
) =>
|
|
213
|
+
`Nilai ${safelyStringifyUnknownValue(error.value)} harus menggunakan huruf besar.`;
|
|
214
|
+
|
|
215
|
+
/** Formats a LowercasedError in Indonesian. */
|
|
216
|
+
export const formatLowercasedError: TypeErrorFormatter<LowercasedError> = (
|
|
217
|
+
error,
|
|
218
|
+
) =>
|
|
219
|
+
`Nilai ${safelyStringifyUnknownValue(error.value)} harus menggunakan huruf kecil.`;
|
|
220
|
+
|
|
181
221
|
/** Formats a TrimmedError in Indonesian. */
|
|
182
222
|
export const formatTrimmedError: TypeErrorFormatter<TrimmedError> = (error) =>
|
|
183
223
|
`Nilai ${safelyStringifyUnknownValue(error.value)} harus dipangkas.`;
|
|
184
224
|
|
|
225
|
+
/** Formats a StartsWithError in Indonesian. */
|
|
226
|
+
export const formatStartsWithError: TypeErrorFormatter<StartsWithError> = (
|
|
227
|
+
error,
|
|
228
|
+
) =>
|
|
229
|
+
`Nilai ${safelyStringifyUnknownValue(error.value)} harus diawali dengan ${safelyStringifyUnknownValue(error.prefix)}.`;
|
|
230
|
+
|
|
185
231
|
/** Formats a MinLengthError in Indonesian. */
|
|
186
232
|
export const formatMinLengthError: TypeErrorFormatter<MinLengthError> = (
|
|
187
233
|
error,
|
|
@@ -272,6 +318,12 @@ export const formatNegativeDecimalStringError: TypeErrorFormatter<
|
|
|
272
318
|
export const formatIntError: TypeErrorFormatter<IntError> = (error) =>
|
|
273
319
|
`Nilai ${safelyStringifyUnknownValue(error.value)} harus berupa bilangan bulat aman.`;
|
|
274
320
|
|
|
321
|
+
/** Formats an IntFromStringError in Indonesian. */
|
|
322
|
+
export const formatIntFromStringError: TypeErrorFormatter<
|
|
323
|
+
IntFromStringError
|
|
324
|
+
> = (error) =>
|
|
325
|
+
`Nilai ${safelyStringifyUnknownValue(error.value)} bukan bilangan bulat desimal.`;
|
|
326
|
+
|
|
275
327
|
/** Formats a GreaterThanError in Indonesian. */
|
|
276
328
|
export const formatGreaterThanError: TypeErrorFormatter<GreaterThanError> = (
|
|
277
329
|
error,
|
|
@@ -500,3 +552,21 @@ export const formatJsonValueError: TypeErrorFormatter<JsonValueError> = (
|
|
|
500
552
|
/** Formats a JsonError in Indonesian. */
|
|
501
553
|
export const formatJsonError: TypeErrorFormatter<JsonError> = (error) =>
|
|
502
554
|
`Nilai ${safelyStringifyUnknownValue(error.value)} tidak dapat diurai menjadi JsonValue.`;
|
|
555
|
+
|
|
556
|
+
/** Formats a {@link ByteSizeLiteralError}. */
|
|
557
|
+
export const formatByteSizeLiteralError: TypeErrorFormatter<
|
|
558
|
+
ByteSizeLiteralError
|
|
559
|
+
> = (error) =>
|
|
560
|
+
`Nilai ${safelyStringifyUnknownValue(error.value)} bukan literal ukuran byte. Gunakan nilai seperti "512KiB" atau "1MiB".`;
|
|
561
|
+
|
|
562
|
+
/** Formats a {@link DurationLiteralError}. */
|
|
563
|
+
export const formatDurationLiteralError: TypeErrorFormatter<
|
|
564
|
+
DurationLiteralError
|
|
565
|
+
> = (error) =>
|
|
566
|
+
`Nilai ${safelyStringifyUnknownValue(error.value)} bukan literal durasi. Gunakan nilai seperti "500ms" atau "1.5s".`;
|
|
567
|
+
|
|
568
|
+
/** Formats a {@link PercentageLiteralError}. */
|
|
569
|
+
export const formatPercentageLiteralError: TypeErrorFormatter<
|
|
570
|
+
PercentageLiteralError
|
|
571
|
+
> = (error) =>
|
|
572
|
+
`Nilai ${safelyStringifyUnknownValue(error.value)} bukan literal persentase. Gunakan nilai seperti "50%" atau "12.5%".`;
|