@evolu/common 8.9.0 → 8.11.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/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/Console.d.ts +62 -7
- package/dist/src/Console.d.ts.map +1 -1
- package/dist/src/Console.js +20 -4
- package/dist/src/Crypto.d.ts +76 -4
- package/dist/src/Crypto.d.ts.map +1 -1
- package/dist/src/Crypto.js +55 -4
- package/dist/src/Error.d.ts +45 -0
- package/dist/src/Error.d.ts.map +1 -1
- package/dist/src/Error.js +69 -0
- package/dist/src/Fs.d.ts +376 -0
- package/dist/src/Fs.d.ts.map +1 -0
- package/dist/src/Fs.js +113 -0
- package/dist/src/Identicon.d.ts +2 -2
- package/dist/src/Identicon.js +2 -2
- package/dist/src/LeakDetector.d.ts +22 -3
- package/dist/src/LeakDetector.d.ts.map +1 -1
- package/dist/src/LeakDetector.js +12 -2
- package/dist/src/LockManager.d.ts +8 -0
- package/dist/src/LockManager.d.ts.map +1 -1
- package/dist/src/LockManager.js +6 -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 +46 -0
- package/dist/src/Platform.d.ts +47 -7
- package/dist/src/Platform.d.ts.map +1 -1
- package/dist/src/Platform.js +24 -5
- package/dist/src/Random.d.ts +25 -2
- package/dist/src/Random.d.ts.map +1 -1
- package/dist/src/Random.js +14 -2
- package/dist/src/Resource.d.ts +156 -1
- package/dist/src/Resource.d.ts.map +1 -1
- package/dist/src/Resource.js +201 -72
- package/dist/src/Schedule.d.ts +11 -10
- package/dist/src/Schedule.d.ts.map +1 -1
- package/dist/src/Schedule.js +1 -1
- package/dist/src/Sqlite.d.ts +132 -16
- package/dist/src/Sqlite.d.ts.map +1 -1
- package/dist/src/Sqlite.js +64 -10
- package/dist/src/Task.d.ts +15 -4
- package/dist/src/Task.d.ts.map +1 -1
- package/dist/src/Task.js +41 -15
- package/dist/src/Test.d.ts +9 -0
- package/dist/src/Test.d.ts.map +1 -1
- package/dist/src/Test.js +4 -0
- package/dist/src/Time.d.ts +179 -20
- package/dist/src/Time.d.ts.map +1 -1
- package/dist/src/Time.js +95 -6
- package/dist/src/Type.d.ts +3056 -1539
- package/dist/src/Type.d.ts.map +1 -1
- package/dist/src/Type.js +2548 -584
- package/dist/src/WebSocket.d.ts +164 -13
- package/dist/src/WebSocket.d.ts.map +1 -1
- package/dist/src/WebSocket.js +133 -24
- package/dist/src/Worker.d.ts +90 -8
- package/dist/src/Worker.d.ts.map +1 -1
- package/dist/src/Worker.js +28 -2
- package/dist/src/index.d.ts +9 -8
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -4
- 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/Db.d.ts +52 -3
- package/dist/src/local-first/Db.d.ts.map +1 -1
- package/dist/src/local-first/Db.js +412 -137
- package/dist/src/local-first/Evolu.d.ts +336 -211
- package/dist/src/local-first/Evolu.d.ts.map +1 -1
- package/dist/src/local-first/Evolu.js +102 -15
- package/dist/src/local-first/Owner.d.ts +13 -30
- package/dist/src/local-first/Owner.d.ts.map +1 -1
- package/dist/src/local-first/Owner.js +13 -30
- package/dist/src/local-first/Protocol.d.ts +95 -17
- package/dist/src/local-first/Protocol.d.ts.map +1 -1
- package/dist/src/local-first/Protocol.js +119 -39
- package/dist/src/local-first/Query.d.ts +8 -15
- package/dist/src/local-first/Query.d.ts.map +1 -1
- package/dist/src/local-first/Schema.d.ts +345 -21
- package/dist/src/local-first/Schema.d.ts.map +1 -1
- package/dist/src/local-first/Schema.js +214 -17
- package/dist/src/local-first/Shared.d.ts +537 -22
- package/dist/src/local-first/Shared.d.ts.map +1 -1
- package/dist/src/local-first/Shared.js +1437 -234
- package/dist/src/local-first/Storage.d.ts +192 -14
- package/dist/src/local-first/Storage.d.ts.map +1 -1
- package/dist/src/local-first/Storage.js +82 -21
- package/dist/src/local-first/Timestamp.d.ts +392 -41
- package/dist/src/local-first/Timestamp.d.ts.map +1 -1
- package/dist/src/local-first/Timestamp.js +404 -82
- package/dist/src/local-first/index.d.ts +0 -1
- package/dist/src/local-first/index.d.ts.map +1 -1
- package/dist/src/local-first/index.js +0 -1
- package/package.json +1 -1
- package/src/Assert.test.ts +2 -5
- package/src/{Binary.test.ts → Bytes.test.ts} +286 -1
- package/src/{Binary.ts → Bytes.ts} +652 -21
- package/src/Config.test.ts +668 -0
- package/src/Config.ts +410 -0
- package/src/Console.ts +62 -7
- package/src/Crypto.ts +76 -4
- package/src/Eq.test.ts +2 -3
- package/src/Error.test.ts +76 -3
- package/src/Error.ts +71 -0
- package/src/Fs.test.ts +105 -0
- package/src/Fs.ts +488 -0
- package/src/Identicon.ts +2 -2
- package/src/LeakDetector.ts +22 -3
- package/src/LockManager.ts +8 -0
- package/src/Number.test.ts +82 -18
- package/src/Number.ts +76 -8
- package/src/Object.test.ts +139 -10
- package/src/Object.ts +49 -0
- package/src/Platform.ts +50 -8
- package/src/Random.ts +25 -2
- package/src/Resource.test.ts +837 -0
- package/src/Resource.ts +235 -15
- package/src/Schedule.test.ts +50 -12
- package/src/Schedule.ts +24 -14
- package/src/Sqlite.ts +138 -18
- package/src/Task.test.ts +189 -8
- package/src/Task.ts +56 -17
- package/src/Test.ts +9 -0
- package/src/Time.test.ts +82 -11
- package/src/Time.ts +246 -24
- package/src/Type.test.ts +3994 -1119
- package/src/Type.ts +7258 -3842
- package/src/Types.test.ts +4 -14
- package/src/WebSocket.ts +313 -40
- package/src/Worker.ts +90 -8
- package/src/index.ts +18 -7
- 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/Db.ts +644 -339
- package/src/local-first/Evolu.test.ts +686 -21
- package/src/local-first/Evolu.ts +450 -228
- package/src/local-first/Owner.ts +13 -30
- package/src/local-first/Protocol.test.ts +618 -11
- package/src/local-first/Protocol.ts +197 -73
- package/src/local-first/Query.ts +8 -15
- package/src/local-first/Schema.test.ts +143 -0
- package/src/local-first/Schema.ts +374 -24
- package/src/local-first/Shared.test.ts +7731 -559
- package/src/local-first/Shared.ts +2036 -267
- package/src/local-first/Storage.ts +219 -33
- package/src/local-first/Timestamp.test.ts +344 -70
- package/src/local-first/Timestamp.ts +435 -119
- package/src/local-first/index.ts +0 -1
- package/dist/src/Binary.d.ts +0 -254
- package/dist/src/Binary.d.ts.map +0 -1
- package/dist/src/local-first/Error.d.ts +0 -12
- package/dist/src/local-first/Error.d.ts.map +0 -1
- package/dist/src/local-first/Error.js +0 -6
- package/dist/src/local-first/LocalAuth.d.ts +0 -150
- package/dist/src/local-first/LocalAuth.d.ts.map +0 -1
- package/dist/src/local-first/LocalAuth.js +0 -179
- package/src/local-first/Error.ts +0 -17
- package/src/local-first/LocalAuth.ts +0 -457
package/src/intl/bn.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 Bengali. */
|
|
124
|
+
export const formatBooleanFromStringError: TypeErrorFormatter<
|
|
125
|
+
BooleanFromStringError
|
|
126
|
+
> = (error) =>
|
|
127
|
+
`${safelyStringifyUnknownValue(error.value)} মানটি বুলিয়ান নয়। true বা false ব্যবহার করুন।`;
|
|
128
|
+
|
|
113
129
|
/** Formats a Symbol TypeOfError in Bengali. */
|
|
114
130
|
export const formatSymbolError: TypeErrorFormatter<TypeOfError<"Symbol">> =
|
|
115
131
|
formatTypeOfError;
|
|
@@ -171,16 +187,46 @@ export const formatInt64StringError: TypeErrorFormatter<Int64StringError> = (
|
|
|
171
187
|
error,
|
|
172
188
|
) => `${safelyStringifyUnknownValue(error.value)} মানটি বৈধ Int64 string নয়।`;
|
|
173
189
|
|
|
190
|
+
/** Formats an IdentifierError in Bengali. */
|
|
191
|
+
export const formatIdentifierError: TypeErrorFormatter<IdentifierError> = (
|
|
192
|
+
error,
|
|
193
|
+
) =>
|
|
194
|
+
`${safelyStringifyUnknownValue(error.value)} মানটি ${error.casing} শনাক্তকারী নয়।`;
|
|
195
|
+
|
|
174
196
|
/** Formats a CapitalizedError in Bengali. */
|
|
175
197
|
export const formatCapitalizedError: TypeErrorFormatter<CapitalizedError> = (
|
|
176
198
|
error,
|
|
177
199
|
) =>
|
|
178
200
|
`${safelyStringifyUnknownValue(error.value)} মানটির প্রথম অক্ষর বড় হাতের হতে হবে।`;
|
|
179
201
|
|
|
202
|
+
/** Formats an UncapitalizedError in Bengali. */
|
|
203
|
+
export const formatUncapitalizedError: TypeErrorFormatter<
|
|
204
|
+
UncapitalizedError
|
|
205
|
+
> = (error) =>
|
|
206
|
+
`মান ${safelyStringifyUnknownValue(error.value)} বড় হাতের অক্ষর দিয়ে শুরু হওয়া চলবে না।`;
|
|
207
|
+
|
|
208
|
+
/** Formats an UppercasedError in Bengali. */
|
|
209
|
+
export const formatUppercasedError: TypeErrorFormatter<UppercasedError> = (
|
|
210
|
+
error,
|
|
211
|
+
) =>
|
|
212
|
+
`মান ${safelyStringifyUnknownValue(error.value)} অবশ্যই বড় হাতের অক্ষরে লেখা হতে হবে।`;
|
|
213
|
+
|
|
214
|
+
/** Formats a LowercasedError in Bengali. */
|
|
215
|
+
export const formatLowercasedError: TypeErrorFormatter<LowercasedError> = (
|
|
216
|
+
error,
|
|
217
|
+
) =>
|
|
218
|
+
`মান ${safelyStringifyUnknownValue(error.value)} অবশ্যই ছোট হাতের অক্ষরে লেখা হতে হবে।`;
|
|
219
|
+
|
|
180
220
|
/** Formats a TrimmedError in Bengali. */
|
|
181
221
|
export const formatTrimmedError: TypeErrorFormatter<TrimmedError> = (error) =>
|
|
182
222
|
`${safelyStringifyUnknownValue(error.value)} মানটির শুরু বা শেষে whitespace থাকা যাবে না।`;
|
|
183
223
|
|
|
224
|
+
/** Formats a StartsWithError in Bengali. */
|
|
225
|
+
export const formatStartsWithError: TypeErrorFormatter<StartsWithError> = (
|
|
226
|
+
error,
|
|
227
|
+
) =>
|
|
228
|
+
`মান ${safelyStringifyUnknownValue(error.value)} অবশ্যই ${safelyStringifyUnknownValue(error.prefix)} দিয়ে শুরু হতে হবে।`;
|
|
229
|
+
|
|
184
230
|
/** Formats a MinLengthError in Bengali. */
|
|
185
231
|
export const formatMinLengthError: TypeErrorFormatter<MinLengthError> = (
|
|
186
232
|
error,
|
|
@@ -271,6 +317,12 @@ export const formatNegativeDecimalStringError: TypeErrorFormatter<
|
|
|
271
317
|
export const formatIntError: TypeErrorFormatter<IntError> = (error) =>
|
|
272
318
|
`${safelyStringifyUnknownValue(error.value)} মানটি safe integer হতে হবে।`;
|
|
273
319
|
|
|
320
|
+
/** Formats an IntFromStringError in Bengali. */
|
|
321
|
+
export const formatIntFromStringError: TypeErrorFormatter<
|
|
322
|
+
IntFromStringError
|
|
323
|
+
> = (error) =>
|
|
324
|
+
`${safelyStringifyUnknownValue(error.value)} মানটি দশমিক পূর্ণসংখ্যা নয়।`;
|
|
325
|
+
|
|
274
326
|
/** Formats a GreaterThanError in Bengali. */
|
|
275
327
|
export const formatGreaterThanError: TypeErrorFormatter<GreaterThanError> = (
|
|
276
328
|
error,
|
|
@@ -499,3 +551,21 @@ export const formatJsonValueError: TypeErrorFormatter<JsonValueError> = (
|
|
|
499
551
|
/** Formats a JsonError in Bengali. */
|
|
500
552
|
export const formatJsonError: TypeErrorFormatter<JsonError> = (error) =>
|
|
501
553
|
`${safelyStringifyUnknownValue(error.value)} মানটিকে JsonValue হিসেবে parse করা যায় না।`;
|
|
554
|
+
|
|
555
|
+
/** Formats a {@link ByteSizeLiteralError}. */
|
|
556
|
+
export const formatByteSizeLiteralError: TypeErrorFormatter<
|
|
557
|
+
ByteSizeLiteralError
|
|
558
|
+
> = (error) =>
|
|
559
|
+
`মান ${safelyStringifyUnknownValue(error.value)} বাইট আকারের লিটারাল নয়। "512KiB" বা "1MiB"-এর মতো একটি মান ব্যবহার করুন।`;
|
|
560
|
+
|
|
561
|
+
/** Formats a {@link DurationLiteralError}. */
|
|
562
|
+
export const formatDurationLiteralError: TypeErrorFormatter<
|
|
563
|
+
DurationLiteralError
|
|
564
|
+
> = (error) =>
|
|
565
|
+
`মান ${safelyStringifyUnknownValue(error.value)} সময়কালের লিটারাল নয়। "500ms" বা "1.5s"-এর মতো একটি মান ব্যবহার করুন।`;
|
|
566
|
+
|
|
567
|
+
/** Formats a {@link PercentageLiteralError}. */
|
|
568
|
+
export const formatPercentageLiteralError: TypeErrorFormatter<
|
|
569
|
+
PercentageLiteralError
|
|
570
|
+
> = (error) =>
|
|
571
|
+
`মান ${safelyStringifyUnknownValue(error.value)} শতাংশের লিটারাল নয়। "50%" বা "12.5%"-এর মতো একটি মান ব্যবহার করুন।`;
|
package/src/intl/ca.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
|
+
/** Formata BooleanFromStringError en català. */
|
|
124
|
+
export const formatBooleanFromStringError: TypeErrorFormatter<
|
|
125
|
+
BooleanFromStringError
|
|
126
|
+
> = (error) =>
|
|
127
|
+
`El valor ${safelyStringifyUnknownValue(error.value)} no és un booleà. Utilitzeu true o false.`;
|
|
128
|
+
|
|
113
129
|
/** Formata Symbol TypeOfError en català. */
|
|
114
130
|
export const formatSymbolError: TypeErrorFormatter<TypeOfError<"Symbol">> =
|
|
115
131
|
formatTypeOfError;
|
|
@@ -173,16 +189,46 @@ export const formatInt64StringError: TypeErrorFormatter<Int64StringError> = (
|
|
|
173
189
|
) =>
|
|
174
190
|
`El valor ${safelyStringifyUnknownValue(error.value)} no és una cadena Int64 vàlida.`;
|
|
175
191
|
|
|
192
|
+
/** Formats an IdentifierError in Catalan. */
|
|
193
|
+
export const formatIdentifierError: TypeErrorFormatter<IdentifierError> = (
|
|
194
|
+
error,
|
|
195
|
+
) =>
|
|
196
|
+
`El valor ${safelyStringifyUnknownValue(error.value)} no és un identificador ${error.casing}.`;
|
|
197
|
+
|
|
176
198
|
/** Formata CapitalizedError en català. */
|
|
177
199
|
export const formatCapitalizedError: TypeErrorFormatter<CapitalizedError> = (
|
|
178
200
|
error,
|
|
179
201
|
) =>
|
|
180
202
|
`El valor ${safelyStringifyUnknownValue(error.value)} ha de començar amb majúscula.`;
|
|
181
203
|
|
|
204
|
+
/** Formats an UncapitalizedError in Catalan. */
|
|
205
|
+
export const formatUncapitalizedError: TypeErrorFormatter<
|
|
206
|
+
UncapitalizedError
|
|
207
|
+
> = (error) =>
|
|
208
|
+
`El valor ${safelyStringifyUnknownValue(error.value)} no pot començar amb una lletra majúscula.`;
|
|
209
|
+
|
|
210
|
+
/** Formats an UppercasedError in Catalan. */
|
|
211
|
+
export const formatUppercasedError: TypeErrorFormatter<UppercasedError> = (
|
|
212
|
+
error,
|
|
213
|
+
) =>
|
|
214
|
+
`El valor ${safelyStringifyUnknownValue(error.value)} ha de ser en majúscules.`;
|
|
215
|
+
|
|
216
|
+
/** Formats a LowercasedError in Catalan. */
|
|
217
|
+
export const formatLowercasedError: TypeErrorFormatter<LowercasedError> = (
|
|
218
|
+
error,
|
|
219
|
+
) =>
|
|
220
|
+
`El valor ${safelyStringifyUnknownValue(error.value)} ha de ser en minúscules.`;
|
|
221
|
+
|
|
182
222
|
/** Formata TrimmedError en català. */
|
|
183
223
|
export const formatTrimmedError: TypeErrorFormatter<TrimmedError> = (error) =>
|
|
184
224
|
`El valor ${safelyStringifyUnknownValue(error.value)} no pot tenir espais en blanc al principi ni al final.`;
|
|
185
225
|
|
|
226
|
+
/** Formats a StartsWithError in Catalan. */
|
|
227
|
+
export const formatStartsWithError: TypeErrorFormatter<StartsWithError> = (
|
|
228
|
+
error,
|
|
229
|
+
) =>
|
|
230
|
+
`El valor ${safelyStringifyUnknownValue(error.value)} ha de començar amb ${safelyStringifyUnknownValue(error.prefix)}.`;
|
|
231
|
+
|
|
186
232
|
/** Formata MinLengthError en català. */
|
|
187
233
|
export const formatMinLengthError: TypeErrorFormatter<MinLengthError> = (
|
|
188
234
|
error,
|
|
@@ -273,6 +319,12 @@ export const formatNegativeDecimalStringError: TypeErrorFormatter<
|
|
|
273
319
|
export const formatIntError: TypeErrorFormatter<IntError> = (error) =>
|
|
274
320
|
`El valor ${safelyStringifyUnknownValue(error.value)} ha de ser un enter segur.`;
|
|
275
321
|
|
|
322
|
+
/** Formata IntFromStringError en català. */
|
|
323
|
+
export const formatIntFromStringError: TypeErrorFormatter<
|
|
324
|
+
IntFromStringError
|
|
325
|
+
> = (error) =>
|
|
326
|
+
`El valor ${safelyStringifyUnknownValue(error.value)} no és un enter decimal.`;
|
|
327
|
+
|
|
276
328
|
/** Formata GreaterThanError en català. */
|
|
277
329
|
export const formatGreaterThanError: TypeErrorFormatter<GreaterThanError> = (
|
|
278
330
|
error,
|
|
@@ -501,3 +553,21 @@ export const formatJsonValueError: TypeErrorFormatter<JsonValueError> = (
|
|
|
501
553
|
/** Formata JsonError en català. */
|
|
502
554
|
export const formatJsonError: TypeErrorFormatter<JsonError> = (error) =>
|
|
503
555
|
`El valor ${safelyStringifyUnknownValue(error.value)} no es pot analitzar com a JsonValue.`;
|
|
556
|
+
|
|
557
|
+
/** Formats a {@link ByteSizeLiteralError}. */
|
|
558
|
+
export const formatByteSizeLiteralError: TypeErrorFormatter<
|
|
559
|
+
ByteSizeLiteralError
|
|
560
|
+
> = (error) =>
|
|
561
|
+
`El valor ${safelyStringifyUnknownValue(error.value)} no és un literal de mida en bytes. Feu servir un valor com ara "512KiB" o "1MiB".`;
|
|
562
|
+
|
|
563
|
+
/** Formats a {@link DurationLiteralError}. */
|
|
564
|
+
export const formatDurationLiteralError: TypeErrorFormatter<
|
|
565
|
+
DurationLiteralError
|
|
566
|
+
> = (error) =>
|
|
567
|
+
`El valor ${safelyStringifyUnknownValue(error.value)} no és un literal de durada. Feu servir un valor com ara "500ms" o "1.5s".`;
|
|
568
|
+
|
|
569
|
+
/** Formats a {@link PercentageLiteralError}. */
|
|
570
|
+
export const formatPercentageLiteralError: TypeErrorFormatter<
|
|
571
|
+
PercentageLiteralError
|
|
572
|
+
> = (error) =>
|
|
573
|
+
`El valor ${safelyStringifyUnknownValue(error.value)} no és un literal de percentatge. Feu servir un valor com ara "50%" o "12.5%".`;
|
package/src/intl/cs.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,
|
|
@@ -107,6 +117,12 @@ export const formatBooleanError: TypeErrorFormatter<TypeOfError<"Boolean">> = (
|
|
|
107
117
|
error,
|
|
108
118
|
) => formatValueMustBe(error.value, "logická hodnota");
|
|
109
119
|
|
|
120
|
+
/** Formats a BooleanFromStringError in Czech. */
|
|
121
|
+
export const formatBooleanFromStringError: TypeErrorFormatter<
|
|
122
|
+
BooleanFromStringError
|
|
123
|
+
> = (error) =>
|
|
124
|
+
`Hodnota ${safelyStringifyUnknownValue(error.value)} musí být true nebo false.`;
|
|
125
|
+
|
|
110
126
|
/** Formats a Symbol TypeOfError in Czech. */
|
|
111
127
|
export const formatSymbolError: TypeErrorFormatter<TypeOfError<"Symbol">> = (
|
|
112
128
|
error,
|
|
@@ -171,15 +187,45 @@ export const formatInt64StringError: TypeErrorFormatter<Int64StringError> = (
|
|
|
171
187
|
) =>
|
|
172
188
|
`Hodnota ${safelyStringifyUnknownValue(error.value)} musí být platný řetězec Int64.`;
|
|
173
189
|
|
|
190
|
+
/** Formats an IdentifierError in Czech. */
|
|
191
|
+
export const formatIdentifierError: TypeErrorFormatter<IdentifierError> = (
|
|
192
|
+
error,
|
|
193
|
+
) =>
|
|
194
|
+
`Hodnota ${safelyStringifyUnknownValue(error.value)} není identifikátor ve formátu ${error.casing}.`;
|
|
195
|
+
|
|
174
196
|
/** Formats a CapitalizedError in Czech. */
|
|
175
197
|
export const formatCapitalizedError: TypeErrorFormatter<CapitalizedError> = (
|
|
176
198
|
error,
|
|
177
199
|
) => `Text ${safelyStringifyUnknownValue(error.value)} musí být kapitalizován.`;
|
|
178
200
|
|
|
201
|
+
/** Formats an UncapitalizedError in Czech. */
|
|
202
|
+
export const formatUncapitalizedError: TypeErrorFormatter<
|
|
203
|
+
UncapitalizedError
|
|
204
|
+
> = (error) =>
|
|
205
|
+
`Hodnota ${safelyStringifyUnknownValue(error.value)} nesmí začínat velkým písmenem.`;
|
|
206
|
+
|
|
207
|
+
/** Formats an UppercasedError in Czech. */
|
|
208
|
+
export const formatUppercasedError: TypeErrorFormatter<UppercasedError> = (
|
|
209
|
+
error,
|
|
210
|
+
) =>
|
|
211
|
+
`Hodnota ${safelyStringifyUnknownValue(error.value)} musí být velkými písmeny.`;
|
|
212
|
+
|
|
213
|
+
/** Formats a LowercasedError in Czech. */
|
|
214
|
+
export const formatLowercasedError: TypeErrorFormatter<LowercasedError> = (
|
|
215
|
+
error,
|
|
216
|
+
) =>
|
|
217
|
+
`Hodnota ${safelyStringifyUnknownValue(error.value)} musí být malými písmeny.`;
|
|
218
|
+
|
|
179
219
|
/** Formats a TrimmedError in Czech. */
|
|
180
220
|
export const formatTrimmedError: TypeErrorFormatter<TrimmedError> = (error) =>
|
|
181
221
|
`Text ${safelyStringifyUnknownValue(error.value)} nesmí obsahovat bílé znaky na začátku ani na konci.`;
|
|
182
222
|
|
|
223
|
+
/** Formats a StartsWithError in Czech. */
|
|
224
|
+
export const formatStartsWithError: TypeErrorFormatter<StartsWithError> = (
|
|
225
|
+
error,
|
|
226
|
+
) =>
|
|
227
|
+
`Hodnota ${safelyStringifyUnknownValue(error.value)} musí začínat na ${safelyStringifyUnknownValue(error.prefix)}.`;
|
|
228
|
+
|
|
183
229
|
/** Formats a MinLengthError in Czech. */
|
|
184
230
|
export const formatMinLengthError: TypeErrorFormatter<MinLengthError> = (
|
|
185
231
|
error,
|
|
@@ -272,6 +318,12 @@ export const formatNegativeDecimalStringError: TypeErrorFormatter<
|
|
|
272
318
|
export const formatIntError: TypeErrorFormatter<IntError> = (error) =>
|
|
273
319
|
`Hodnota ${safelyStringifyUnknownValue(error.value)} musí být bezpečné celé číslo.`;
|
|
274
320
|
|
|
321
|
+
/** Formats an IntFromStringError in Czech. */
|
|
322
|
+
export const formatIntFromStringError: TypeErrorFormatter<
|
|
323
|
+
IntFromStringError
|
|
324
|
+
> = (error) =>
|
|
325
|
+
`Hodnota ${safelyStringifyUnknownValue(error.value)} musí být celé číslo v desítkovém zápisu.`;
|
|
326
|
+
|
|
275
327
|
/** Formats a GreaterThanError in Czech. */
|
|
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 Czech. */
|
|
501
553
|
export const formatJsonError: TypeErrorFormatter<JsonError> = (error) =>
|
|
502
554
|
`Hodnotu ${safelyStringifyUnknownValue(error.value)} nelze parsovat jako JsonValue.`;
|
|
555
|
+
|
|
556
|
+
/** Formats a {@link ByteSizeLiteralError}. */
|
|
557
|
+
export const formatByteSizeLiteralError: TypeErrorFormatter<
|
|
558
|
+
ByteSizeLiteralError
|
|
559
|
+
> = (error) =>
|
|
560
|
+
`Hodnota ${safelyStringifyUnknownValue(error.value)} není literál velikosti v bajtech. Použijte hodnotu jako "512KiB" nebo "1MiB".`;
|
|
561
|
+
|
|
562
|
+
/** Formats a {@link DurationLiteralError}. */
|
|
563
|
+
export const formatDurationLiteralError: TypeErrorFormatter<
|
|
564
|
+
DurationLiteralError
|
|
565
|
+
> = (error) =>
|
|
566
|
+
`Hodnota ${safelyStringifyUnknownValue(error.value)} není literál délky trvání. Použijte hodnotu jako "500ms" nebo "1.5s".`;
|
|
567
|
+
|
|
568
|
+
/** Formats a {@link PercentageLiteralError}. */
|
|
569
|
+
export const formatPercentageLiteralError: TypeErrorFormatter<
|
|
570
|
+
PercentageLiteralError
|
|
571
|
+
> = (error) =>
|
|
572
|
+
`Hodnota ${safelyStringifyUnknownValue(error.value)} není procentní literál. Použijte hodnotu jako "50%" nebo "12.5%".`;
|
package/src/intl/da.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
|
+
/** Formaterer BooleanFromStringError på dansk. */
|
|
124
|
+
export const formatBooleanFromStringError: TypeErrorFormatter<
|
|
125
|
+
BooleanFromStringError
|
|
126
|
+
> = (error) =>
|
|
127
|
+
`Værdien ${safelyStringifyUnknownValue(error.value)} er ikke en boolesk værdi. Brug true eller false.`;
|
|
128
|
+
|
|
113
129
|
/** Formaterer Symbol TypeOfError på dansk. */
|
|
114
130
|
export const formatSymbolError: TypeErrorFormatter<TypeOfError<"Symbol">> =
|
|
115
131
|
formatTypeOfError;
|
|
@@ -173,16 +189,46 @@ export const formatInt64StringError: TypeErrorFormatter<Int64StringError> = (
|
|
|
173
189
|
) =>
|
|
174
190
|
`Værdien ${safelyStringifyUnknownValue(error.value)} er ikke en gyldig Int64-streng.`;
|
|
175
191
|
|
|
192
|
+
/** Formats an IdentifierError in Danish. */
|
|
193
|
+
export const formatIdentifierError: TypeErrorFormatter<IdentifierError> = (
|
|
194
|
+
error,
|
|
195
|
+
) =>
|
|
196
|
+
`Værdien ${safelyStringifyUnknownValue(error.value)} er ikke en ${error.casing}-identifikator.`;
|
|
197
|
+
|
|
176
198
|
/** Formaterer CapitalizedError på dansk. */
|
|
177
199
|
export const formatCapitalizedError: TypeErrorFormatter<CapitalizedError> = (
|
|
178
200
|
error,
|
|
179
201
|
) =>
|
|
180
202
|
`Værdien ${safelyStringifyUnknownValue(error.value)} skal begynde med stort bogstav.`;
|
|
181
203
|
|
|
204
|
+
/** Formats an UncapitalizedError in Danish. */
|
|
205
|
+
export const formatUncapitalizedError: TypeErrorFormatter<
|
|
206
|
+
UncapitalizedError
|
|
207
|
+
> = (error) =>
|
|
208
|
+
`Værdien ${safelyStringifyUnknownValue(error.value)} må ikke begynde med et stort bogstav.`;
|
|
209
|
+
|
|
210
|
+
/** Formats an UppercasedError in Danish. */
|
|
211
|
+
export const formatUppercasedError: TypeErrorFormatter<UppercasedError> = (
|
|
212
|
+
error,
|
|
213
|
+
) =>
|
|
214
|
+
`Værdien ${safelyStringifyUnknownValue(error.value)} skal være skrevet med store bogstaver.`;
|
|
215
|
+
|
|
216
|
+
/** Formats a LowercasedError in Danish. */
|
|
217
|
+
export const formatLowercasedError: TypeErrorFormatter<LowercasedError> = (
|
|
218
|
+
error,
|
|
219
|
+
) =>
|
|
220
|
+
`Værdien ${safelyStringifyUnknownValue(error.value)} skal være skrevet med små bogstaver.`;
|
|
221
|
+
|
|
182
222
|
/** Formaterer TrimmedError på dansk. */
|
|
183
223
|
export const formatTrimmedError: TypeErrorFormatter<TrimmedError> = (error) =>
|
|
184
224
|
`Værdien ${safelyStringifyUnknownValue(error.value)} skal være trimmet.`;
|
|
185
225
|
|
|
226
|
+
/** Formats a StartsWithError in Danish. */
|
|
227
|
+
export const formatStartsWithError: TypeErrorFormatter<StartsWithError> = (
|
|
228
|
+
error,
|
|
229
|
+
) =>
|
|
230
|
+
`Værdien ${safelyStringifyUnknownValue(error.value)} skal starte med ${safelyStringifyUnknownValue(error.prefix)}.`;
|
|
231
|
+
|
|
186
232
|
/** Formaterer MinLengthError på dansk. */
|
|
187
233
|
export const formatMinLengthError: TypeErrorFormatter<MinLengthError> = (
|
|
188
234
|
error,
|
|
@@ -273,6 +319,12 @@ export const formatNegativeDecimalStringError: TypeErrorFormatter<
|
|
|
273
319
|
export const formatIntError: TypeErrorFormatter<IntError> = (error) =>
|
|
274
320
|
`Værdien ${safelyStringifyUnknownValue(error.value)} skal være et sikkert heltal.`;
|
|
275
321
|
|
|
322
|
+
/** Formaterer IntFromStringError på dansk. */
|
|
323
|
+
export const formatIntFromStringError: TypeErrorFormatter<
|
|
324
|
+
IntFromStringError
|
|
325
|
+
> = (error) =>
|
|
326
|
+
`Værdien ${safelyStringifyUnknownValue(error.value)} er ikke et decimalt heltal.`;
|
|
327
|
+
|
|
276
328
|
/** Formaterer GreaterThanError på dansk. */
|
|
277
329
|
export const formatGreaterThanError: TypeErrorFormatter<GreaterThanError> = (
|
|
278
330
|
error,
|
|
@@ -501,3 +553,21 @@ export const formatJsonValueError: TypeErrorFormatter<JsonValueError> = (
|
|
|
501
553
|
/** Formaterer JsonError på dansk. */
|
|
502
554
|
export const formatJsonError: TypeErrorFormatter<JsonError> = (error) =>
|
|
503
555
|
`Værdien ${safelyStringifyUnknownValue(error.value)} kan ikke parses til en JsonValue.`;
|
|
556
|
+
|
|
557
|
+
/** Formats a {@link ByteSizeLiteralError}. */
|
|
558
|
+
export const formatByteSizeLiteralError: TypeErrorFormatter<
|
|
559
|
+
ByteSizeLiteralError
|
|
560
|
+
> = (error) =>
|
|
561
|
+
`Værdien ${safelyStringifyUnknownValue(error.value)} er ikke en literal for en størrelse i bytes. Brug en værdi som "512KiB" eller "1MiB".`;
|
|
562
|
+
|
|
563
|
+
/** Formats a {@link DurationLiteralError}. */
|
|
564
|
+
export const formatDurationLiteralError: TypeErrorFormatter<
|
|
565
|
+
DurationLiteralError
|
|
566
|
+
> = (error) =>
|
|
567
|
+
`Værdien ${safelyStringifyUnknownValue(error.value)} er ikke en varighedsliteral. Brug en værdi som "500ms" eller "1.5s".`;
|
|
568
|
+
|
|
569
|
+
/** Formats a {@link PercentageLiteralError}. */
|
|
570
|
+
export const formatPercentageLiteralError: TypeErrorFormatter<
|
|
571
|
+
PercentageLiteralError
|
|
572
|
+
> = (error) =>
|
|
573
|
+
`Værdien ${safelyStringifyUnknownValue(error.value)} er ikke en procentliteral. Brug en værdi som "50%" eller "12.5%".`;
|
package/src/intl/de.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
|
+
/** Formatiert BooleanFromStringError auf Deutsch. */
|
|
124
|
+
export const formatBooleanFromStringError: TypeErrorFormatter<
|
|
125
|
+
BooleanFromStringError
|
|
126
|
+
> = (error) =>
|
|
127
|
+
`Der Wert ${safelyStringifyUnknownValue(error.value)} ist kein boolescher Wert. Verwenden Sie true oder false.`;
|
|
128
|
+
|
|
113
129
|
/** Formatiert einen Symbol-TypeOfError auf Deutsch. */
|
|
114
130
|
export const formatSymbolError: TypeErrorFormatter<TypeOfError<"Symbol">> =
|
|
115
131
|
formatTypeOfError;
|
|
@@ -173,16 +189,46 @@ export const formatInt64StringError: TypeErrorFormatter<Int64StringError> = (
|
|
|
173
189
|
) =>
|
|
174
190
|
`Der Wert ${safelyStringifyUnknownValue(error.value)} ist kein gültiger Int64-String.`;
|
|
175
191
|
|
|
192
|
+
/** Formats an IdentifierError in German. */
|
|
193
|
+
export const formatIdentifierError: TypeErrorFormatter<IdentifierError> = (
|
|
194
|
+
error,
|
|
195
|
+
) =>
|
|
196
|
+
`Der Wert ${safelyStringifyUnknownValue(error.value)} ist kein ${error.casing}-Bezeichner.`;
|
|
197
|
+
|
|
176
198
|
/** Formatiert CapitalizedError auf Deutsch. */
|
|
177
199
|
export const formatCapitalizedError: TypeErrorFormatter<CapitalizedError> = (
|
|
178
200
|
error,
|
|
179
201
|
) =>
|
|
180
202
|
`Der Wert ${safelyStringifyUnknownValue(error.value)} muss mit einem Großbuchstaben beginnen.`;
|
|
181
203
|
|
|
204
|
+
/** Formats an UncapitalizedError in German. */
|
|
205
|
+
export const formatUncapitalizedError: TypeErrorFormatter<
|
|
206
|
+
UncapitalizedError
|
|
207
|
+
> = (error) =>
|
|
208
|
+
`Der Wert ${safelyStringifyUnknownValue(error.value)} darf nicht mit einem Großbuchstaben beginnen.`;
|
|
209
|
+
|
|
210
|
+
/** Formats an UppercasedError in German. */
|
|
211
|
+
export const formatUppercasedError: TypeErrorFormatter<UppercasedError> = (
|
|
212
|
+
error,
|
|
213
|
+
) =>
|
|
214
|
+
`Der Wert ${safelyStringifyUnknownValue(error.value)} muss in Großbuchstaben geschrieben sein.`;
|
|
215
|
+
|
|
216
|
+
/** Formats a LowercasedError in German. */
|
|
217
|
+
export const formatLowercasedError: TypeErrorFormatter<LowercasedError> = (
|
|
218
|
+
error,
|
|
219
|
+
) =>
|
|
220
|
+
`Der Wert ${safelyStringifyUnknownValue(error.value)} muss in Kleinbuchstaben geschrieben sein.`;
|
|
221
|
+
|
|
182
222
|
/** Formatiert TrimmedError auf Deutsch. */
|
|
183
223
|
export const formatTrimmedError: TypeErrorFormatter<TrimmedError> = (error) =>
|
|
184
224
|
`Der Wert ${safelyStringifyUnknownValue(error.value)} muss getrimmt sein.`;
|
|
185
225
|
|
|
226
|
+
/** Formats a StartsWithError in German. */
|
|
227
|
+
export const formatStartsWithError: TypeErrorFormatter<StartsWithError> = (
|
|
228
|
+
error,
|
|
229
|
+
) =>
|
|
230
|
+
`Der Wert ${safelyStringifyUnknownValue(error.value)} muss mit ${safelyStringifyUnknownValue(error.prefix)} beginnen.`;
|
|
231
|
+
|
|
186
232
|
/** Formatiert MinLengthError auf Deutsch. */
|
|
187
233
|
export const formatMinLengthError: TypeErrorFormatter<MinLengthError> = (
|
|
188
234
|
error,
|
|
@@ -273,6 +319,12 @@ export const formatNegativeDecimalStringError: TypeErrorFormatter<
|
|
|
273
319
|
export const formatIntError: TypeErrorFormatter<IntError> = (error) =>
|
|
274
320
|
`Der Wert ${safelyStringifyUnknownValue(error.value)} muss eine sichere Ganzzahl sein.`;
|
|
275
321
|
|
|
322
|
+
/** Formatiert IntFromStringError auf Deutsch. */
|
|
323
|
+
export const formatIntFromStringError: TypeErrorFormatter<
|
|
324
|
+
IntFromStringError
|
|
325
|
+
> = (error) =>
|
|
326
|
+
`Der Wert ${safelyStringifyUnknownValue(error.value)} ist keine dezimale Ganzzahl.`;
|
|
327
|
+
|
|
276
328
|
/** Formatiert GreaterThanError auf Deutsch. */
|
|
277
329
|
export const formatGreaterThanError: TypeErrorFormatter<GreaterThanError> = (
|
|
278
330
|
error,
|
|
@@ -501,3 +553,21 @@ export const formatJsonValueError: TypeErrorFormatter<JsonValueError> = (
|
|
|
501
553
|
/** Formatiert JsonError auf Deutsch. */
|
|
502
554
|
export const formatJsonError: TypeErrorFormatter<JsonError> = (error) =>
|
|
503
555
|
`Der Wert ${safelyStringifyUnknownValue(error.value)} kann nicht in einen JsonValue geparst werden.`;
|
|
556
|
+
|
|
557
|
+
/** Formats a {@link ByteSizeLiteralError}. */
|
|
558
|
+
export const formatByteSizeLiteralError: TypeErrorFormatter<
|
|
559
|
+
ByteSizeLiteralError
|
|
560
|
+
> = (error) =>
|
|
561
|
+
`Der Wert ${safelyStringifyUnknownValue(error.value)} ist kein Byte-Größenliteral. Verwenden Sie einen Wert wie "512KiB" oder "1MiB".`;
|
|
562
|
+
|
|
563
|
+
/** Formats a {@link DurationLiteralError}. */
|
|
564
|
+
export const formatDurationLiteralError: TypeErrorFormatter<
|
|
565
|
+
DurationLiteralError
|
|
566
|
+
> = (error) =>
|
|
567
|
+
`Der Wert ${safelyStringifyUnknownValue(error.value)} ist kein Dauerliteral. Verwenden Sie einen Wert wie "500ms" oder "1.5s".`;
|
|
568
|
+
|
|
569
|
+
/** Formats a {@link PercentageLiteralError}. */
|
|
570
|
+
export const formatPercentageLiteralError: TypeErrorFormatter<
|
|
571
|
+
PercentageLiteralError
|
|
572
|
+
> = (error) =>
|
|
573
|
+
`Der Wert ${safelyStringifyUnknownValue(error.value)} ist kein Prozentliteral. Verwenden Sie einen Wert wie "50%" oder "12.5%".`;
|