@evolu/common 8.1.0 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/Function.d.ts +1 -0
- package/dist/src/Function.d.ts.map +1 -1
- package/dist/src/Http.d.ts +9 -0
- package/dist/src/Http.d.ts.map +1 -1
- package/dist/src/Number.d.ts +66 -6
- package/dist/src/Number.d.ts.map +1 -1
- package/dist/src/Number.js +11 -3
- package/dist/src/Object.d.ts +1 -0
- package/dist/src/Object.d.ts.map +1 -1
- package/dist/src/RefCount.d.ts +1 -0
- package/dist/src/RefCount.d.ts.map +1 -1
- package/dist/src/Relation.d.ts +2 -0
- package/dist/src/Relation.d.ts.map +1 -1
- package/dist/src/Resource.d.ts +1 -0
- package/dist/src/Resource.d.ts.map +1 -1
- package/dist/src/Result.d.ts +383 -548
- package/dist/src/Result.d.ts.map +1 -1
- package/dist/src/Result.js +296 -46
- package/dist/src/Schedule.d.ts +2 -2
- package/dist/src/Schedule.d.ts.map +1 -1
- package/dist/src/StackTrace.d.ts +1 -0
- package/dist/src/StackTrace.d.ts.map +1 -1
- package/dist/src/Task.d.ts +978 -1061
- package/dist/src/Task.d.ts.map +1 -1
- package/dist/src/Task.js +1010 -159
- package/dist/src/Time.d.ts +71 -34
- package/dist/src/Time.d.ts.map +1 -1
- package/dist/src/Time.js +77 -1
- package/dist/src/Type.d.ts +1740 -795
- package/dist/src/Type.d.ts.map +1 -1
- package/dist/src/Type.js +1634 -211
- package/dist/src/Types.d.ts +0 -24
- package/dist/src/Types.d.ts.map +1 -1
- package/dist/src/intl/_en.d.ts +126 -0
- package/dist/src/intl/_en.d.ts.map +1 -0
- package/dist/src/intl/_en.js +267 -0
- package/dist/src/intl/ar.d.ts +117 -0
- package/dist/src/intl/ar.d.ts.map +1 -0
- package/dist/src/intl/ar.js +245 -0
- package/dist/src/intl/bn.d.ts +117 -0
- package/dist/src/intl/bn.d.ts.map +1 -0
- package/dist/src/intl/bn.js +258 -0
- package/dist/src/intl/ca.d.ts +117 -0
- package/dist/src/intl/ca.d.ts.map +1 -0
- package/dist/src/intl/ca.js +258 -0
- package/dist/src/intl/cs.d.ts +30 -7
- package/dist/src/intl/cs.d.ts.map +1 -1
- package/dist/src/intl/cs.js +65 -28
- package/dist/src/intl/da.d.ts +117 -0
- package/dist/src/intl/da.d.ts.map +1 -0
- package/dist/src/intl/da.js +258 -0
- package/dist/src/intl/de.d.ts +117 -0
- package/dist/src/intl/de.d.ts.map +1 -0
- package/dist/src/intl/de.js +258 -0
- package/dist/src/intl/el.d.ts +117 -0
- package/dist/src/intl/el.d.ts.map +1 -0
- package/dist/src/intl/el.js +265 -0
- package/dist/src/intl/es.d.ts +117 -0
- package/dist/src/intl/es.d.ts.map +1 -0
- package/dist/src/intl/es.js +258 -0
- package/dist/src/intl/fa.d.ts +117 -0
- package/dist/src/intl/fa.d.ts.map +1 -0
- package/dist/src/intl/fa.js +258 -0
- package/dist/src/intl/fi.d.ts +117 -0
- package/dist/src/intl/fi.d.ts.map +1 -0
- package/dist/src/intl/fi.js +258 -0
- package/dist/src/intl/fil.d.ts +117 -0
- package/dist/src/intl/fil.d.ts.map +1 -0
- package/dist/src/intl/fil.js +258 -0
- package/dist/src/intl/fr.d.ts +117 -0
- package/dist/src/intl/fr.d.ts.map +1 -0
- package/dist/src/intl/fr.js +258 -0
- package/dist/src/intl/he.d.ts +117 -0
- package/dist/src/intl/he.d.ts.map +1 -0
- package/dist/src/intl/he.js +258 -0
- package/dist/src/intl/hi.d.ts +117 -0
- package/dist/src/intl/hi.d.ts.map +1 -0
- package/dist/src/intl/hi.js +258 -0
- package/dist/src/intl/hr.d.ts +117 -0
- package/dist/src/intl/hr.d.ts.map +1 -0
- package/dist/src/intl/hr.js +265 -0
- package/dist/src/intl/hu.d.ts +63 -0
- package/dist/src/intl/hu.d.ts.map +1 -0
- package/dist/src/intl/hu.js +204 -0
- package/dist/src/intl/id.d.ts +117 -0
- package/dist/src/intl/id.d.ts.map +1 -0
- package/dist/src/intl/id.js +258 -0
- package/dist/src/intl/index.d.ts +42 -0
- package/dist/src/intl/index.d.ts.map +1 -1
- package/dist/src/intl/index.js +42 -0
- package/dist/src/intl/it.d.ts +117 -0
- package/dist/src/intl/it.d.ts.map +1 -0
- package/dist/src/intl/it.js +258 -0
- package/dist/src/intl/ja.d.ts +117 -0
- package/dist/src/intl/ja.d.ts.map +1 -0
- package/dist/src/intl/ja.js +258 -0
- package/dist/src/intl/ko.d.ts +117 -0
- package/dist/src/intl/ko.d.ts.map +1 -0
- package/dist/src/intl/ko.js +258 -0
- package/dist/src/intl/ml.d.ts +117 -0
- package/dist/src/intl/ml.d.ts.map +1 -0
- package/dist/src/intl/ml.js +258 -0
- package/dist/src/intl/mr.d.ts +117 -0
- package/dist/src/intl/mr.d.ts.map +1 -0
- package/dist/src/intl/mr.js +258 -0
- package/dist/src/intl/ms.d.ts +117 -0
- package/dist/src/intl/ms.d.ts.map +1 -0
- package/dist/src/intl/ms.js +245 -0
- package/dist/src/intl/nb.d.ts +63 -0
- package/dist/src/intl/nb.d.ts.map +1 -0
- package/dist/src/intl/nb.js +191 -0
- package/dist/src/intl/nl.d.ts +117 -0
- package/dist/src/intl/nl.d.ts.map +1 -0
- package/dist/src/intl/nl.js +258 -0
- package/dist/src/intl/pa.d.ts +117 -0
- package/dist/src/intl/pa.d.ts.map +1 -0
- package/dist/src/intl/pa.js +258 -0
- package/dist/src/intl/pl.d.ts +117 -0
- package/dist/src/intl/pl.d.ts.map +1 -0
- package/dist/src/intl/pl.js +242 -0
- package/dist/src/intl/pt-BR.d.ts +117 -0
- package/dist/src/intl/pt-BR.d.ts.map +1 -0
- package/dist/src/intl/pt-BR.js +258 -0
- package/dist/src/intl/pt.d.ts +117 -0
- package/dist/src/intl/pt.d.ts.map +1 -0
- package/dist/src/intl/pt.js +246 -0
- package/dist/src/intl/ro.d.ts +117 -0
- package/dist/src/intl/ro.d.ts.map +1 -0
- package/dist/src/intl/ro.js +258 -0
- package/dist/src/intl/sk.d.ts +117 -0
- package/dist/src/intl/sk.d.ts.map +1 -0
- package/dist/src/intl/sk.js +244 -0
- package/dist/src/intl/sl.d.ts +117 -0
- package/dist/src/intl/sl.d.ts.map +1 -0
- package/dist/src/intl/sl.js +258 -0
- package/dist/src/intl/sv.d.ts +117 -0
- package/dist/src/intl/sv.d.ts.map +1 -0
- package/dist/src/intl/sv.js +258 -0
- package/dist/src/intl/sw.d.ts +63 -0
- package/dist/src/intl/sw.d.ts.map +1 -0
- package/dist/src/intl/sw.js +191 -0
- package/dist/src/intl/ta.d.ts +117 -0
- package/dist/src/intl/ta.d.ts.map +1 -0
- package/dist/src/intl/ta.js +258 -0
- package/dist/src/intl/te.d.ts +117 -0
- package/dist/src/intl/te.d.ts.map +1 -0
- package/dist/src/intl/te.js +258 -0
- package/dist/src/intl/th.d.ts +117 -0
- package/dist/src/intl/th.d.ts.map +1 -0
- package/dist/src/intl/th.js +258 -0
- package/dist/src/intl/tr.d.ts +117 -0
- package/dist/src/intl/tr.d.ts.map +1 -0
- package/dist/src/intl/tr.js +255 -0
- package/dist/src/intl/uk.d.ts +117 -0
- package/dist/src/intl/uk.d.ts.map +1 -0
- package/dist/src/intl/uk.js +258 -0
- package/dist/src/intl/ur.d.ts +117 -0
- package/dist/src/intl/ur.d.ts.map +1 -0
- package/dist/src/intl/ur.js +245 -0
- package/dist/src/intl/vi.d.ts +117 -0
- package/dist/src/intl/vi.d.ts.map +1 -0
- package/dist/src/intl/vi.js +255 -0
- package/dist/src/intl/zh-CN.d.ts +117 -0
- package/dist/src/intl/zh-CN.d.ts.map +1 -0
- package/dist/src/intl/zh-CN.js +258 -0
- package/dist/src/intl/zh-TW.d.ts +117 -0
- package/dist/src/intl/zh-TW.d.ts.map +1 -0
- package/dist/src/intl/zh-TW.js +258 -0
- package/dist/src/local-first/Owner.d.ts +156 -62
- package/dist/src/local-first/Owner.d.ts.map +1 -1
- package/dist/src/local-first/Owner.js +119 -20
- package/package.json +1 -1
- package/src/Function.ts +2 -0
- package/src/Http.ts +9 -0
- package/src/Number.ts +85 -14
- package/src/Object.ts +2 -0
- package/src/RefCount.ts +2 -0
- package/src/Relation.ts +4 -0
- package/src/Resource.ts +2 -0
- package/src/Result.ts +397 -560
- package/src/Schedule.ts +1 -1
- package/src/StackTrace.ts +2 -0
- package/src/Task.ts +1145 -1225
- package/src/Time.ts +110 -62
- package/src/Type.ts +2842 -835
- package/src/Types.ts +0 -49
- package/src/intl/_en.ts +497 -0
- package/src/intl/ar.ts +417 -0
- package/src/intl/bn.ts +486 -0
- package/src/intl/ca.ts +488 -0
- package/src/intl/cs.ts +131 -32
- package/src/intl/da.ts +488 -0
- package/src/intl/de.ts +488 -0
- package/src/intl/el.ts +494 -0
- package/src/intl/es.ts +488 -0
- package/src/intl/fa.ts +487 -0
- package/src/intl/fi.ts +487 -0
- package/src/intl/fil.ts +488 -0
- package/src/intl/fr.ts +488 -0
- package/src/intl/he.ts +486 -0
- package/src/intl/hi.ts +487 -0
- package/src/intl/hr.ts +494 -0
- package/src/intl/hu.ts +387 -0
- package/src/intl/id.ts +487 -0
- package/src/intl/index.ts +42 -0
- package/src/intl/it.ts +488 -0
- package/src/intl/ja.ts +488 -0
- package/src/intl/ko.ts +487 -0
- package/src/intl/ml.ts +487 -0
- package/src/intl/mr.ts +487 -0
- package/src/intl/ms.ts +410 -0
- package/src/intl/nb.ts +364 -0
- package/src/intl/nl.ts +488 -0
- package/src/intl/pa.ts +487 -0
- package/src/intl/pl.ts +450 -0
- package/src/intl/pt-BR.ts +487 -0
- package/src/intl/pt.ts +424 -0
- package/src/intl/ro.ts +488 -0
- package/src/intl/sk.ts +412 -0
- package/src/intl/sl.ts +487 -0
- package/src/intl/sv.ts +488 -0
- package/src/intl/sw.ts +324 -0
- package/src/intl/ta.ts +487 -0
- package/src/intl/te.ts +487 -0
- package/src/intl/th.ts +484 -0
- package/src/intl/tr.ts +487 -0
- package/src/intl/uk.ts +488 -0
- package/src/intl/ur.ts +410 -0
- package/src/intl/vi.ts +435 -0
- package/src/intl/zh-CN.ts +482 -0
- package/src/intl/zh-TW.ts +482 -0
- package/src/local-first/Owner.ts +156 -62
package/src/intl/mr.ts
ADDED
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* मराठी Evolu Type त्रुटी स्वरूपकार.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { assertNonNullable } from "../Assert.ts";
|
|
8
|
+
import { safelyStringifyUnknownValue } from "../String.ts";
|
|
9
|
+
import type {
|
|
10
|
+
ArrayError,
|
|
11
|
+
Base64UrlError,
|
|
12
|
+
BetweenError,
|
|
13
|
+
CapitalizedError,
|
|
14
|
+
DateIsoError,
|
|
15
|
+
DateIsoFromDateError,
|
|
16
|
+
DecimalStringError,
|
|
17
|
+
DiscriminatedUnionError,
|
|
18
|
+
EvoluTypeError,
|
|
19
|
+
FiniteError,
|
|
20
|
+
GreaterThanError,
|
|
21
|
+
GreaterThanOrEqualToError,
|
|
22
|
+
InstanceOfError,
|
|
23
|
+
Int64Error,
|
|
24
|
+
Int64StringError,
|
|
25
|
+
IntError,
|
|
26
|
+
IdError,
|
|
27
|
+
JsonError,
|
|
28
|
+
JsonValueError,
|
|
29
|
+
LengthError,
|
|
30
|
+
LessThanError,
|
|
31
|
+
LessThanOrEqualToError,
|
|
32
|
+
LiteralError,
|
|
33
|
+
MaxLengthError,
|
|
34
|
+
MinLengthError,
|
|
35
|
+
MnemonicError,
|
|
36
|
+
MultipleOfError,
|
|
37
|
+
NegativeDecimalStringError,
|
|
38
|
+
NegativeError,
|
|
39
|
+
NameError,
|
|
40
|
+
NeverError,
|
|
41
|
+
NonNaNError,
|
|
42
|
+
NonNegativeDecimalStringError,
|
|
43
|
+
NonNegativeError,
|
|
44
|
+
NonPositiveDecimalStringError,
|
|
45
|
+
NonPositiveError,
|
|
46
|
+
ObjectError,
|
|
47
|
+
ObjectNotObjectError,
|
|
48
|
+
ObjectPropertyAccessError,
|
|
49
|
+
ObjectTagError,
|
|
50
|
+
ObjectUnexpectedPrototypeError,
|
|
51
|
+
PositiveDecimalStringError,
|
|
52
|
+
PositiveError,
|
|
53
|
+
RecordError,
|
|
54
|
+
RegexError,
|
|
55
|
+
SetError,
|
|
56
|
+
TableIdError,
|
|
57
|
+
TemplateLiteralError,
|
|
58
|
+
TrimmedError,
|
|
59
|
+
TupleElementsError,
|
|
60
|
+
TupleError,
|
|
61
|
+
TypeError,
|
|
62
|
+
TypeErrorFormatter,
|
|
63
|
+
TypeOfError,
|
|
64
|
+
UInt64Error,
|
|
65
|
+
UnionError,
|
|
66
|
+
} from "../Type.ts";
|
|
67
|
+
|
|
68
|
+
const formatTypeOfError = (
|
|
69
|
+
error: TypeOfError<
|
|
70
|
+
"String" | "Number" | "BigInt" | "Boolean" | "Symbol" | "Function"
|
|
71
|
+
>,
|
|
72
|
+
): string => {
|
|
73
|
+
const typeOf = error.expected.toLowerCase();
|
|
74
|
+
|
|
75
|
+
return `मूल्य ${safelyStringifyUnknownValue(error.value)} हे ${typeOf} नाही.`;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const formatPlainObjectRootError = (
|
|
79
|
+
reason:
|
|
80
|
+
ObjectNotObjectError["reason"] | ObjectUnexpectedPrototypeError["reason"],
|
|
81
|
+
): string =>
|
|
82
|
+
reason.kind === "NotObject"
|
|
83
|
+
? `मूल्य ${safelyStringifyUnknownValue(reason.value)} हे object नाही.`
|
|
84
|
+
: "मूल्य object आहे, परंतु Object Output हा plain object असला पाहिजे किंवा त्याचा prototype null असला पाहिजे.";
|
|
85
|
+
|
|
86
|
+
/** Formats a NeverError in Marathi. */
|
|
87
|
+
export const formatNeverError: TypeErrorFormatter<NeverError> = (error) =>
|
|
88
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} हे Never प्रकारासाठी वैध नाही.`;
|
|
89
|
+
|
|
90
|
+
/** Formats a String TypeOfError in Marathi. */
|
|
91
|
+
export const formatStringError: TypeErrorFormatter<TypeOfError<"String">> =
|
|
92
|
+
formatTypeOfError;
|
|
93
|
+
|
|
94
|
+
/** Formats a TemplateLiteralError in Marathi. */
|
|
95
|
+
export const formatTemplateLiteralError: TypeErrorFormatter<
|
|
96
|
+
TemplateLiteralError
|
|
97
|
+
> = (error) =>
|
|
98
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} हे template literal शी जुळत नाही.`;
|
|
99
|
+
|
|
100
|
+
/** Formats a Number TypeOfError in Marathi. */
|
|
101
|
+
export const formatNumberError: TypeErrorFormatter<TypeOfError<"Number">> =
|
|
102
|
+
formatTypeOfError;
|
|
103
|
+
|
|
104
|
+
/** Formats a BigInt TypeOfError in Marathi. */
|
|
105
|
+
export const formatBigIntError: TypeErrorFormatter<TypeOfError<"BigInt">> =
|
|
106
|
+
formatTypeOfError;
|
|
107
|
+
|
|
108
|
+
/** Formats a Boolean TypeOfError in Marathi. */
|
|
109
|
+
export const formatBooleanError: TypeErrorFormatter<TypeOfError<"Boolean">> =
|
|
110
|
+
formatTypeOfError;
|
|
111
|
+
|
|
112
|
+
/** Formats a Symbol TypeOfError in Marathi. */
|
|
113
|
+
export const formatSymbolError: TypeErrorFormatter<TypeOfError<"Symbol">> =
|
|
114
|
+
formatTypeOfError;
|
|
115
|
+
|
|
116
|
+
/** Formats a Function TypeOfError in Marathi. */
|
|
117
|
+
export const formatFunctionError: TypeErrorFormatter<TypeOfError<"Function">> =
|
|
118
|
+
formatTypeOfError;
|
|
119
|
+
|
|
120
|
+
/** Formats an EvoluTypeError in Marathi. */
|
|
121
|
+
export const formatEvoluTypeError: TypeErrorFormatter<EvoluTypeError> = (
|
|
122
|
+
error,
|
|
123
|
+
) => `मूल्य ${safelyStringifyUnknownValue(error.value)} हे Evolu Type नाही.`;
|
|
124
|
+
|
|
125
|
+
/** Formats an ObjectTagError in Marathi. */
|
|
126
|
+
export const formatObjectTagError: TypeErrorFormatter<ObjectTagError> = (
|
|
127
|
+
error,
|
|
128
|
+
) =>
|
|
129
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} कडे अपेक्षित object tag ${safelyStringifyUnknownValue(error.expected)} नाही.`;
|
|
130
|
+
|
|
131
|
+
/** Formats an InstanceOfError in Marathi. */
|
|
132
|
+
export const formatInstanceOfError: TypeErrorFormatter<InstanceOfError> = (
|
|
133
|
+
error,
|
|
134
|
+
) =>
|
|
135
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} हे ${error.constructorName} चे instance नाही.`;
|
|
136
|
+
|
|
137
|
+
/** Formats a LiteralError in Marathi. */
|
|
138
|
+
export const formatLiteralError: TypeErrorFormatter<LiteralError> = (error) =>
|
|
139
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} हे अपेक्षित literal शी काटेकोरपणे समान नाही: ${globalThis.String(error.expected)}.`;
|
|
140
|
+
|
|
141
|
+
/** Formats a UnionError in Marathi. */
|
|
142
|
+
export const formatUnionError: TypeErrorFormatter<UnionError> = () =>
|
|
143
|
+
"मूल्य कोणत्याही अनुमत variant शी जुळत नाही.";
|
|
144
|
+
|
|
145
|
+
/** Formats a DateIsoError in Marathi. */
|
|
146
|
+
export const formatDateIsoError: TypeErrorFormatter<DateIsoError> = (error) =>
|
|
147
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} ही canonical ISO date-time string नाही.`;
|
|
148
|
+
|
|
149
|
+
/** Formats a DateIsoFromDateError in Marathi. */
|
|
150
|
+
export const formatDateIsoFromDateError: TypeErrorFormatter<
|
|
151
|
+
DateIsoFromDateError
|
|
152
|
+
> = () => "Date ला DateIso म्हणून दर्शवता येत नाही.";
|
|
153
|
+
|
|
154
|
+
/** Formats a DecimalStringError in Marathi. */
|
|
155
|
+
export const formatDecimalStringError: TypeErrorFormatter<
|
|
156
|
+
DecimalStringError
|
|
157
|
+
> = (error) =>
|
|
158
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} ही canonical decimal string असली पाहिजे.`;
|
|
159
|
+
|
|
160
|
+
/** Formats an Int64Error in Marathi. */
|
|
161
|
+
export const formatInt64Error: TypeErrorFormatter<Int64Error> = (error) =>
|
|
162
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} हा वैध signed 64-bit integer (Int64) नाही.`;
|
|
163
|
+
|
|
164
|
+
/** Formats a UInt64Error in Marathi. */
|
|
165
|
+
export const formatUInt64Error: TypeErrorFormatter<UInt64Error> = (error) =>
|
|
166
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} हा वैध unsigned 64-bit integer (UInt64) नाही.`;
|
|
167
|
+
|
|
168
|
+
/** Formats an Int64StringError in Marathi. */
|
|
169
|
+
export const formatInt64StringError: TypeErrorFormatter<Int64StringError> = (
|
|
170
|
+
error,
|
|
171
|
+
) =>
|
|
172
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} ही वैध Int64 string नाही.`;
|
|
173
|
+
|
|
174
|
+
/** Formats a CapitalizedError in Marathi. */
|
|
175
|
+
export const formatCapitalizedError: TypeErrorFormatter<CapitalizedError> = (
|
|
176
|
+
error,
|
|
177
|
+
) =>
|
|
178
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} चे पहिले अक्षर मोठे असले पाहिजे.`;
|
|
179
|
+
|
|
180
|
+
/** Formats a TrimmedError in Marathi. */
|
|
181
|
+
export const formatTrimmedError: TypeErrorFormatter<TrimmedError> = (error) =>
|
|
182
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} मधील सुरुवातीची आणि शेवटची रिकामी जागा काढलेली असली पाहिजे.`;
|
|
183
|
+
|
|
184
|
+
/** Formats a MinLengthError in Marathi. */
|
|
185
|
+
export const formatMinLengthError: TypeErrorFormatter<MinLengthError> = (
|
|
186
|
+
error,
|
|
187
|
+
) =>
|
|
188
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} किमान ${error.min} लांबीची अट पूर्ण करत नाही.`;
|
|
189
|
+
|
|
190
|
+
/** Formats a MaxLengthError in Marathi. */
|
|
191
|
+
export const formatMaxLengthError: TypeErrorFormatter<MaxLengthError> = (
|
|
192
|
+
error,
|
|
193
|
+
) =>
|
|
194
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} ची लांबी कमाल ${error.max} पेक्षा जास्त आहे.`;
|
|
195
|
+
|
|
196
|
+
/** Formats a LengthError in Marathi. */
|
|
197
|
+
export const formatLengthError: TypeErrorFormatter<LengthError> = (error) =>
|
|
198
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} ची आवश्यक लांबी ${error.exact} नाही.`;
|
|
199
|
+
|
|
200
|
+
/** Formats a RegexError in Marathi. */
|
|
201
|
+
export const formatRegexError: TypeErrorFormatter<RegexError> = (error) =>
|
|
202
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} हे /${error.source}/${error.flags}/ शी जुळत नाही.`;
|
|
203
|
+
|
|
204
|
+
/** Formats a Base64UrlError in Marathi. */
|
|
205
|
+
export const formatBase64UrlError: TypeErrorFormatter<Base64UrlError> = (
|
|
206
|
+
error,
|
|
207
|
+
) =>
|
|
208
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} ही वैध Base64Url string नाही.`;
|
|
209
|
+
|
|
210
|
+
/** Formats a NameError in Marathi. */
|
|
211
|
+
export const formatNameError: TypeErrorFormatter<NameError> = (error) =>
|
|
212
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} हे वैध Name नाही.`;
|
|
213
|
+
|
|
214
|
+
/** Formats a MnemonicError in Marathi. */
|
|
215
|
+
export const formatMnemonicError: TypeErrorFormatter<MnemonicError> = (error) =>
|
|
216
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} हा वैध इंग्रजी BIP39 mnemonic नाही.`;
|
|
217
|
+
|
|
218
|
+
/** Formats an IdError in Marathi. */
|
|
219
|
+
export const formatIdError: TypeErrorFormatter<IdError> = (error) =>
|
|
220
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} हा वैध Id नाही.`;
|
|
221
|
+
|
|
222
|
+
/** Formats a TableIdError in Marathi. */
|
|
223
|
+
export const formatTableIdError: TypeErrorFormatter<TableIdError> = (error) =>
|
|
224
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} हा table ${error.table} साठी वैध Id नाही.`;
|
|
225
|
+
|
|
226
|
+
/** Formats a NonNegativeError in Marathi. */
|
|
227
|
+
export const formatNonNegativeError: TypeErrorFormatter<NonNegativeError> = (
|
|
228
|
+
error,
|
|
229
|
+
) =>
|
|
230
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} ऋणेतर असले पाहिजे (>= 0).`;
|
|
231
|
+
|
|
232
|
+
/** Formats a NonNegativeDecimalStringError in Marathi. */
|
|
233
|
+
export const formatNonNegativeDecimalStringError: TypeErrorFormatter<
|
|
234
|
+
NonNegativeDecimalStringError
|
|
235
|
+
> = (error) =>
|
|
236
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} ही ऋणेतर decimal string असली पाहिजे.`;
|
|
237
|
+
|
|
238
|
+
/** Formats a PositiveError in Marathi. */
|
|
239
|
+
export const formatPositiveError: TypeErrorFormatter<PositiveError> = (error) =>
|
|
240
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} धनात्मक असले पाहिजे (> 0).`;
|
|
241
|
+
|
|
242
|
+
/** Formats a PositiveDecimalStringError in Marathi. */
|
|
243
|
+
export const formatPositiveDecimalStringError: TypeErrorFormatter<
|
|
244
|
+
PositiveDecimalStringError
|
|
245
|
+
> = (error) =>
|
|
246
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} ही धनात्मक decimal string असली पाहिजे.`;
|
|
247
|
+
|
|
248
|
+
/** Formats a NonPositiveError in Marathi. */
|
|
249
|
+
export const formatNonPositiveError: TypeErrorFormatter<NonPositiveError> = (
|
|
250
|
+
error,
|
|
251
|
+
) =>
|
|
252
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} धनात्मक नसले पाहिजे (<= 0).`;
|
|
253
|
+
|
|
254
|
+
/** Formats a NonPositiveDecimalStringError in Marathi. */
|
|
255
|
+
export const formatNonPositiveDecimalStringError: TypeErrorFormatter<
|
|
256
|
+
NonPositiveDecimalStringError
|
|
257
|
+
> = (error) =>
|
|
258
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} ही धनात्मक नसलेली decimal string असली पाहिजे.`;
|
|
259
|
+
|
|
260
|
+
/** Formats a NegativeError in Marathi. */
|
|
261
|
+
export const formatNegativeError: TypeErrorFormatter<NegativeError> = (error) =>
|
|
262
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} ऋणात्मक असले पाहिजे (< 0).`;
|
|
263
|
+
|
|
264
|
+
/** Formats a NegativeDecimalStringError in Marathi. */
|
|
265
|
+
export const formatNegativeDecimalStringError: TypeErrorFormatter<
|
|
266
|
+
NegativeDecimalStringError
|
|
267
|
+
> = (error) =>
|
|
268
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} ही ऋणात्मक decimal string असली पाहिजे.`;
|
|
269
|
+
|
|
270
|
+
/** Formats an IntError in Marathi. */
|
|
271
|
+
export const formatIntError: TypeErrorFormatter<IntError> = (error) =>
|
|
272
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} हा safe integer असला पाहिजे.`;
|
|
273
|
+
|
|
274
|
+
/** Formats a GreaterThanError in Marathi. */
|
|
275
|
+
export const formatGreaterThanError: TypeErrorFormatter<GreaterThanError> = (
|
|
276
|
+
error,
|
|
277
|
+
) =>
|
|
278
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} हे ${error.min} पेक्षा मोठे असले पाहिजे.`;
|
|
279
|
+
|
|
280
|
+
/** Formats a GreaterThanOrEqualToError in Marathi. */
|
|
281
|
+
export const formatGreaterThanOrEqualToError: TypeErrorFormatter<
|
|
282
|
+
GreaterThanOrEqualToError
|
|
283
|
+
> = (error) =>
|
|
284
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} हे ${error.min} पेक्षा मोठे किंवा त्याच्या बरोबर असले पाहिजे.`;
|
|
285
|
+
|
|
286
|
+
/** Formats a LessThanError in Marathi. */
|
|
287
|
+
export const formatLessThanError: TypeErrorFormatter<LessThanError> = (error) =>
|
|
288
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} हे ${error.max} पेक्षा लहान असले पाहिजे.`;
|
|
289
|
+
|
|
290
|
+
/** Formats a LessThanOrEqualToError in Marathi. */
|
|
291
|
+
export const formatLessThanOrEqualToError: TypeErrorFormatter<
|
|
292
|
+
LessThanOrEqualToError
|
|
293
|
+
> = (error) =>
|
|
294
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} हे ${error.max} पेक्षा लहान किंवा त्याच्या बरोबर असले पाहिजे.`;
|
|
295
|
+
|
|
296
|
+
/** Formats a NonNaNError in Marathi. */
|
|
297
|
+
export const formatNonNaNError: TypeErrorFormatter<NonNaNError> = () =>
|
|
298
|
+
"मूल्य NaN नसले पाहिजे.";
|
|
299
|
+
|
|
300
|
+
/** Formats a FiniteError in Marathi. */
|
|
301
|
+
export const formatFiniteError: TypeErrorFormatter<FiniteError> = (error) =>
|
|
302
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} हे मर्यादित असले पाहिजे.`;
|
|
303
|
+
|
|
304
|
+
/** Formats a MultipleOfError in Marathi. */
|
|
305
|
+
export const formatMultipleOfError: TypeErrorFormatter<MultipleOfError> = (
|
|
306
|
+
error,
|
|
307
|
+
) =>
|
|
308
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} हे ${error.divisor} चे पटीत असले पाहिजे.`;
|
|
309
|
+
|
|
310
|
+
/** Formats a BetweenError in Marathi. */
|
|
311
|
+
export const formatBetweenError: TypeErrorFormatter<BetweenError> = (error) =>
|
|
312
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} हे ${error.min} आणि ${error.max} दरम्यान, दोन्ही मर्यादांसह, असले पाहिजे.`;
|
|
313
|
+
|
|
314
|
+
/** Formats an ArrayError in Marathi. */
|
|
315
|
+
export const formatArrayError: TypeErrorFormatter<ArrayError> = (error) => {
|
|
316
|
+
if (error.reason.kind === "NotArray") {
|
|
317
|
+
return `मूल्य ${safelyStringifyUnknownValue(error.reason.value)} हे array नाही.`;
|
|
318
|
+
}
|
|
319
|
+
const issue = error.reason.issues[0];
|
|
320
|
+
|
|
321
|
+
switch (issue.kind) {
|
|
322
|
+
case "Hole":
|
|
323
|
+
return `index ${issue.index} वरील array element गहाळ आहे.`;
|
|
324
|
+
case "Accessor":
|
|
325
|
+
return `index ${issue.index} वरील array element ही data property असली पाहिजे.`;
|
|
326
|
+
case "ExcessProperty":
|
|
327
|
+
return "अतिरिक्त Array property ला अनुमती नाही. ती काढून टाका किंवा वेगळा Type वापरा.";
|
|
328
|
+
case "Element":
|
|
329
|
+
return `index ${issue.index} वरील array element अवैध आहे.`;
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
/** Formats a SetError in Marathi. */
|
|
334
|
+
export const formatSetError: TypeErrorFormatter<SetError> = (error) => {
|
|
335
|
+
if (error.reason.kind === "NotSet") {
|
|
336
|
+
return `मूल्य ${safelyStringifyUnknownValue(error.reason.value)} हे Set नाही.`;
|
|
337
|
+
}
|
|
338
|
+
if (error.reason.kind === "UnexpectedPrototype") {
|
|
339
|
+
return "मूल्य हे Set subclass चे instance आहे, परंतु Set Output हा थेट Set instance असला पाहिजे.";
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
const issue = error.reason.issues[0];
|
|
343
|
+
|
|
344
|
+
switch (issue.kind) {
|
|
345
|
+
case "ExcessProperty":
|
|
346
|
+
return `अतिरिक्त Set property ${safelyStringifyUnknownValue(issue.key)} ला अनुमती नाही.`;
|
|
347
|
+
case "Element":
|
|
348
|
+
return `index ${issue.index} वरील Set element अवैध आहे.`;
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
/** Formats a TupleError in Marathi. */
|
|
353
|
+
export const formatTupleError: TypeErrorFormatter<
|
|
354
|
+
TupleError | TupleElementsError<TypeError>
|
|
355
|
+
> = (error) => {
|
|
356
|
+
if (error.reason.kind === "NotArray") {
|
|
357
|
+
return `मूल्य ${safelyStringifyUnknownValue(error.reason.value)} हे tuple नाही.`;
|
|
358
|
+
}
|
|
359
|
+
if (error.reason.kind === "InvalidLength") {
|
|
360
|
+
return `Tuple मध्ये नेमके ${error.reason.expected} elements असले पाहिजेत, परंतु मूल्यात ${error.reason.actual} आहेत.`;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
const issue = error.reason.issues[0];
|
|
364
|
+
|
|
365
|
+
switch (issue.kind) {
|
|
366
|
+
case "Hole":
|
|
367
|
+
return `index ${issue.index} वरील Tuple element गहाळ आहे.`;
|
|
368
|
+
case "Accessor":
|
|
369
|
+
return `index ${issue.index} वरील Tuple element ही data property असली पाहिजे.`;
|
|
370
|
+
case "ExcessProperty":
|
|
371
|
+
return "अतिरिक्त Tuple property ला अनुमती नाही. ती काढून टाका किंवा वेगळा Type वापरा.";
|
|
372
|
+
case "Element":
|
|
373
|
+
return `index ${issue.index} वरील Tuple element अवैध आहे.`;
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
/** Formats a RecordError in Marathi. */
|
|
378
|
+
export const formatRecordError: TypeErrorFormatter<RecordError> = (error) => {
|
|
379
|
+
if (error.reason.kind === "NotRecord") {
|
|
380
|
+
return `मूल्य ${safelyStringifyUnknownValue(error.reason.value)} हे Record नाही.`;
|
|
381
|
+
}
|
|
382
|
+
if (error.reason.kind === "NotPlainRecord") {
|
|
383
|
+
return "मूल्य object आहे, परंतु Record Output हा plain object असला पाहिजे किंवा त्याचा prototype null असला पाहिजे.";
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
const issue = error.reason.issues[0];
|
|
387
|
+
|
|
388
|
+
switch (issue.kind) {
|
|
389
|
+
case "Key":
|
|
390
|
+
return `Property key ${safelyStringifyUnknownValue(issue.key)} अवैध आहे.`;
|
|
391
|
+
case "Value":
|
|
392
|
+
return `Property ${safelyStringifyUnknownValue(issue.key)} चे मूल्य अवैध आहे.`;
|
|
393
|
+
case "Accessor":
|
|
394
|
+
return `Record property ${safelyStringifyUnknownValue(issue.key)} ही data property असली पाहिजे.`;
|
|
395
|
+
case "NonEnumerable":
|
|
396
|
+
return `Record property ${safelyStringifyUnknownValue(issue.key)} enumerable असली पाहिजे.`;
|
|
397
|
+
case "Collision":
|
|
398
|
+
return `Record keys ${safelyStringifyUnknownValue(issue.previousKey)} आणि ${safelyStringifyUnknownValue(issue.key)} decode केल्यावर तीच key ${safelyStringifyUnknownValue(issue.outputKey)} मिळते.`;
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
/** Formats an ObjectError in Marathi. */
|
|
403
|
+
export const formatObjectError: TypeErrorFormatter<ObjectError> = (error) => {
|
|
404
|
+
if (error.reason.kind !== "Properties") {
|
|
405
|
+
return formatPlainObjectRootError(error.reason);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
const key = Reflect.ownKeys(error.reason.errors).at(0);
|
|
409
|
+
assertNonNullable(key);
|
|
410
|
+
const propertyError = error.reason.errors[key];
|
|
411
|
+
assertNonNullable(propertyError);
|
|
412
|
+
|
|
413
|
+
if (propertyError.type === "ObjectPropertyAccess") {
|
|
414
|
+
switch ((propertyError as ObjectPropertyAccessError).reason) {
|
|
415
|
+
case "Accessor":
|
|
416
|
+
return "Object property ही data property असली पाहिजे. हा Type वापरण्यापूर्वी accessor values चे plain data मध्ये materialize करा किंवा वेगळा Type वापरा.";
|
|
417
|
+
case "NonEnumerable":
|
|
418
|
+
return "Object property enumerable असली पाहिजे. ती enumerable करा किंवा वेगळा Type वापरा.";
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
if (propertyError.type === "ObjectMissingProperty") {
|
|
422
|
+
return `आवश्यक property ${safelyStringifyUnknownValue(key)} गहाळ आहे.`;
|
|
423
|
+
}
|
|
424
|
+
if (typeof key === "symbol") {
|
|
425
|
+
return "Object property key ही string असली पाहिजे. symbol property काढून टाका किंवा वेगळा Type वापरा.";
|
|
426
|
+
}
|
|
427
|
+
if (propertyError.type === "ObjectExcessProperty") {
|
|
428
|
+
return `Property ${safelyStringifyUnknownValue(key)} ला अनुमती नाही. ती काढून टाका किंवा वेगळा Type वापरा.`;
|
|
429
|
+
}
|
|
430
|
+
return `Property ${safelyStringifyUnknownValue(key)} अवैध आहे.`;
|
|
431
|
+
};
|
|
432
|
+
|
|
433
|
+
/** Formats a DiscriminatedUnionError in Marathi. */
|
|
434
|
+
export const formatDiscriminatedUnionError: TypeErrorFormatter<
|
|
435
|
+
DiscriminatedUnionError
|
|
436
|
+
> = (error) => {
|
|
437
|
+
switch (error.reason.kind) {
|
|
438
|
+
case "Object":
|
|
439
|
+
return formatPlainObjectRootError(error.reason.error.reason);
|
|
440
|
+
case "PropertyAccess": {
|
|
441
|
+
const property = `Discriminator property ${safelyStringifyUnknownValue(error.reason.key)}`;
|
|
442
|
+
if (error.reason.reason === "Accessor") {
|
|
443
|
+
return `${property} ही data property असली पाहिजे.`;
|
|
444
|
+
}
|
|
445
|
+
if (error.reason.reason === "Inherited") {
|
|
446
|
+
return `${property} ही स्वतःची property असली पाहिजे.`;
|
|
447
|
+
}
|
|
448
|
+
return `${property} enumerable असली पाहिजे.`;
|
|
449
|
+
}
|
|
450
|
+
case "Discriminator":
|
|
451
|
+
return `Discriminator property ${safelyStringifyUnknownValue(error.reason.key)} चे मूल्य ${safelyStringifyUnknownValue(error.reason.value)} अनपेक्षित आहे.`;
|
|
452
|
+
case "Member":
|
|
453
|
+
return `निवडलेला variant ${safelyStringifyUnknownValue(error.reason.discriminator)} अवैध आहे.`;
|
|
454
|
+
}
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
/** Formats a JsonValueError in Marathi. */
|
|
458
|
+
export const formatJsonValueError: TypeErrorFormatter<JsonValueError> = (
|
|
459
|
+
error,
|
|
460
|
+
) => {
|
|
461
|
+
const issue = error.reason.issues[0];
|
|
462
|
+
|
|
463
|
+
switch (issue.kind) {
|
|
464
|
+
case "InvalidType":
|
|
465
|
+
return `मूल्य ${safelyStringifyUnknownValue(issue.value)} हे JSON value नाही.`;
|
|
466
|
+
case "NonFiniteNumber":
|
|
467
|
+
return "JSON number मर्यादित असला पाहिजे.";
|
|
468
|
+
case "UnexpectedPrototype":
|
|
469
|
+
return "मूल्य object आहे, परंतु JsonValue object हा plain object असला पाहिजे किंवा त्याचा prototype null असला पाहिजे.";
|
|
470
|
+
case "Accessor":
|
|
471
|
+
return "JSON property ही data property असली पाहिजे. हा Type वापरण्यापूर्वी accessor values चे plain data मध्ये materialize करा किंवा वेगळा Type वापरा.";
|
|
472
|
+
case "NonEnumerable":
|
|
473
|
+
return "JSON object property enumerable असली पाहिजे. ती काढून टाका किंवा वेगळा Type वापरा.";
|
|
474
|
+
case "SymbolProperty":
|
|
475
|
+
return "JSON object property key ही string असली पाहिजे. symbol property काढून टाका किंवा वेगळा Type वापरा.";
|
|
476
|
+
case "Hole":
|
|
477
|
+
return "JSON array element गहाळ आहे.";
|
|
478
|
+
case "ExcessProperty":
|
|
479
|
+
return "अतिरिक्त JSON array property ला अनुमती नाही. ती काढून टाका किंवा वेगळा Type वापरा.";
|
|
480
|
+
case "CircularReference":
|
|
481
|
+
return "JsonValue मध्ये circular references नसले पाहिजेत.";
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
|
|
485
|
+
/** Formats a JsonError in Marathi. */
|
|
486
|
+
export const formatJsonError: TypeErrorFormatter<JsonError> = (error) =>
|
|
487
|
+
`मूल्य ${safelyStringifyUnknownValue(error.value)} चे JsonValue मध्ये parsing करता येत नाही.`;
|