@nxtedition/types 1.6.0 → 1.6.2
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/common/block.d.ts +4 -13
- package/dist/common/block.js +148 -611
- package/dist/common/file.d.ts +8 -5
- package/dist/common/file.js +289 -177
- package/package.json +1 -1
package/dist/common/file.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import __typia from "typia";
|
|
2
2
|
export const isFile = input => {
|
|
3
|
-
const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) &&
|
|
4
|
-
const $io1 = input => undefined === input.file || "string" === typeof input.file;
|
|
3
|
+
const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
|
|
4
|
+
const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
|
|
5
5
|
const $io2 = input => "string" === typeof input.message;
|
|
6
6
|
return "object" === typeof input && null !== input && $io0(input);
|
|
7
7
|
};
|
|
8
8
|
export const assertFile = (input, errorFactory) => {
|
|
9
9
|
const __is = input => {
|
|
10
|
-
const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) &&
|
|
11
|
-
const $io1 = input => undefined === input.file || "string" === typeof input.file;
|
|
10
|
+
const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
|
|
11
|
+
const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
|
|
12
12
|
const $io2 = input => "string" === typeof input.message;
|
|
13
13
|
return "object" === typeof input && null !== input && $io0(input);
|
|
14
14
|
};
|
|
@@ -71,22 +71,6 @@ export const assertFile = (input, errorFactory) => {
|
|
|
71
71
|
path: _path + ".tags",
|
|
72
72
|
expected: "Array<string>",
|
|
73
73
|
value: input.tags
|
|
74
|
-
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
|
|
75
|
-
path: _path + ".error",
|
|
76
|
-
expected: "(Array<__type>.o1 | null)",
|
|
77
|
-
value: input.error
|
|
78
|
-
}, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
79
|
-
path: _path + ".error[" + _index3 + "]",
|
|
80
|
-
expected: "__type.o1",
|
|
81
|
-
value: elem
|
|
82
|
-
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
83
|
-
path: _path + ".error[" + _index3 + "]",
|
|
84
|
-
expected: "__type.o1",
|
|
85
|
-
value: elem
|
|
86
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
87
|
-
path: _path + ".error",
|
|
88
|
-
expected: "(Array<__type>.o1 | null)",
|
|
89
|
-
value: input.error
|
|
90
74
|
}, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
|
|
91
75
|
path: _path + ".resumable",
|
|
92
76
|
expected: "string",
|
|
@@ -115,12 +99,44 @@ export const assertFile = (input, errorFactory) => {
|
|
|
115
99
|
path: _path + ".btime",
|
|
116
100
|
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
117
101
|
value: input.btime
|
|
102
|
+
}, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
|
|
103
|
+
path: _path + ".completed",
|
|
104
|
+
expected: "boolean",
|
|
105
|
+
value: input.completed
|
|
106
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
|
|
107
|
+
path: _path + ".error",
|
|
108
|
+
expected: "(Array<__type>.o1 | null)",
|
|
109
|
+
value: input.error
|
|
110
|
+
}, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
111
|
+
path: _path + ".error[" + _index3 + "]",
|
|
112
|
+
expected: "__type.o1",
|
|
113
|
+
value: elem
|
|
114
|
+
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
115
|
+
path: _path + ".error[" + _index3 + "]",
|
|
116
|
+
expected: "__type.o1",
|
|
117
|
+
value: elem
|
|
118
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
119
|
+
path: _path + ".error",
|
|
120
|
+
expected: "(Array<__type>.o1 | null)",
|
|
121
|
+
value: input.error
|
|
118
122
|
}, errorFactory));
|
|
119
|
-
const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
123
|
+
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
120
124
|
path: _path + ".file",
|
|
121
125
|
expected: "(string | undefined)",
|
|
122
126
|
value: input.file
|
|
123
|
-
}, errorFactory)
|
|
127
|
+
}, errorFactory)) && (undefined === input.offset || "number" === typeof input.offset || $guard(_exceptionable, {
|
|
128
|
+
path: _path + ".offset",
|
|
129
|
+
expected: "(number | undefined)",
|
|
130
|
+
value: input.offset
|
|
131
|
+
}, errorFactory)) && (undefined === input.start || "number" === typeof input.start || $guard(_exceptionable, {
|
|
132
|
+
path: _path + ".start",
|
|
133
|
+
expected: "(number | undefined)",
|
|
134
|
+
value: input.start
|
|
135
|
+
}, errorFactory)) && (undefined === input.end || "number" === typeof input.end || $guard(_exceptionable, {
|
|
136
|
+
path: _path + ".end",
|
|
137
|
+
expected: "(number | undefined)",
|
|
138
|
+
value: input.end
|
|
139
|
+
}, errorFactory));
|
|
124
140
|
const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.message || $guard(_exceptionable, {
|
|
125
141
|
path: _path + ".message",
|
|
126
142
|
expected: "string",
|
|
@@ -165,10 +181,6 @@ export const randomFile = generator => {
|
|
|
165
181
|
deleted: (generator?.boolean ?? $generator.boolean)(),
|
|
166
182
|
refs: (generator?.array ?? $generator.array)(() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)),
|
|
167
183
|
tags: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
|
|
168
|
-
error: $pick([
|
|
169
|
-
() => null,
|
|
170
|
-
() => (generator?.array ?? $generator.array)(() => $ro2(_recursive, _recursive ? 1 + _depth : _depth))
|
|
171
|
-
])(),
|
|
172
184
|
resumable: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
173
185
|
mimeType: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
174
186
|
hash: (generator?.customs ?? $generator.customs)?.string?.([
|
|
@@ -189,12 +201,29 @@ export const randomFile = generator => {
|
|
|
189
201
|
kind: "type",
|
|
190
202
|
value: "uint64"
|
|
191
203
|
}
|
|
192
|
-
]) ?? (generator?.integer ?? $generator.integer)(0, 10)
|
|
204
|
+
]) ?? (generator?.integer ?? $generator.integer)(0, 10),
|
|
205
|
+
completed: (generator?.boolean ?? $generator.boolean)(),
|
|
206
|
+
error: $pick([
|
|
207
|
+
() => null,
|
|
208
|
+
() => (generator?.array ?? $generator.array)(() => $ro2(_recursive, _recursive ? 1 + _depth : _depth))
|
|
209
|
+
])()
|
|
193
210
|
});
|
|
194
211
|
const $ro1 = (_recursive = false, _depth = 0) => ({
|
|
195
212
|
file: $pick([
|
|
196
213
|
() => undefined,
|
|
197
214
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
215
|
+
])(),
|
|
216
|
+
offset: $pick([
|
|
217
|
+
() => undefined,
|
|
218
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
219
|
+
])(),
|
|
220
|
+
start: $pick([
|
|
221
|
+
() => undefined,
|
|
222
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
223
|
+
])(),
|
|
224
|
+
end: $pick([
|
|
225
|
+
() => undefined,
|
|
226
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
198
227
|
])()
|
|
199
228
|
});
|
|
200
229
|
const $ro2 = (_recursive = false, _depth = 0) => ({
|
|
@@ -204,8 +233,8 @@ export const randomFile = generator => {
|
|
|
204
233
|
};
|
|
205
234
|
export const assertGuardFile = (input, errorFactory) => {
|
|
206
235
|
const __is = input => {
|
|
207
|
-
const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) &&
|
|
208
|
-
const $io1 = input => undefined === input.file || "string" === typeof input.file;
|
|
236
|
+
const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
|
|
237
|
+
const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
|
|
209
238
|
const $io2 = input => "string" === typeof input.message;
|
|
210
239
|
return "object" === typeof input && null !== input && $io0(input);
|
|
211
240
|
};
|
|
@@ -268,22 +297,6 @@ export const assertGuardFile = (input, errorFactory) => {
|
|
|
268
297
|
path: _path + ".tags",
|
|
269
298
|
expected: "Array<string>",
|
|
270
299
|
value: input.tags
|
|
271
|
-
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
|
|
272
|
-
path: _path + ".error",
|
|
273
|
-
expected: "(Array<__type>.o1 | null)",
|
|
274
|
-
value: input.error
|
|
275
|
-
}, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
276
|
-
path: _path + ".error[" + _index3 + "]",
|
|
277
|
-
expected: "__type.o1",
|
|
278
|
-
value: elem
|
|
279
|
-
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
280
|
-
path: _path + ".error[" + _index3 + "]",
|
|
281
|
-
expected: "__type.o1",
|
|
282
|
-
value: elem
|
|
283
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
284
|
-
path: _path + ".error",
|
|
285
|
-
expected: "(Array<__type>.o1 | null)",
|
|
286
|
-
value: input.error
|
|
287
300
|
}, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
|
|
288
301
|
path: _path + ".resumable",
|
|
289
302
|
expected: "string",
|
|
@@ -312,12 +325,44 @@ export const assertGuardFile = (input, errorFactory) => {
|
|
|
312
325
|
path: _path + ".btime",
|
|
313
326
|
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
314
327
|
value: input.btime
|
|
328
|
+
}, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
|
|
329
|
+
path: _path + ".completed",
|
|
330
|
+
expected: "boolean",
|
|
331
|
+
value: input.completed
|
|
332
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
|
|
333
|
+
path: _path + ".error",
|
|
334
|
+
expected: "(Array<__type>.o1 | null)",
|
|
335
|
+
value: input.error
|
|
336
|
+
}, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
337
|
+
path: _path + ".error[" + _index3 + "]",
|
|
338
|
+
expected: "__type.o1",
|
|
339
|
+
value: elem
|
|
340
|
+
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
341
|
+
path: _path + ".error[" + _index3 + "]",
|
|
342
|
+
expected: "__type.o1",
|
|
343
|
+
value: elem
|
|
344
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
345
|
+
path: _path + ".error",
|
|
346
|
+
expected: "(Array<__type>.o1 | null)",
|
|
347
|
+
value: input.error
|
|
315
348
|
}, errorFactory));
|
|
316
|
-
const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
349
|
+
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
317
350
|
path: _path + ".file",
|
|
318
351
|
expected: "(string | undefined)",
|
|
319
352
|
value: input.file
|
|
320
|
-
}, errorFactory)
|
|
353
|
+
}, errorFactory)) && (undefined === input.offset || "number" === typeof input.offset || $guard(_exceptionable, {
|
|
354
|
+
path: _path + ".offset",
|
|
355
|
+
expected: "(number | undefined)",
|
|
356
|
+
value: input.offset
|
|
357
|
+
}, errorFactory)) && (undefined === input.start || "number" === typeof input.start || $guard(_exceptionable, {
|
|
358
|
+
path: _path + ".start",
|
|
359
|
+
expected: "(number | undefined)",
|
|
360
|
+
value: input.start
|
|
361
|
+
}, errorFactory)) && (undefined === input.end || "number" === typeof input.end || $guard(_exceptionable, {
|
|
362
|
+
path: _path + ".end",
|
|
363
|
+
expected: "(number | undefined)",
|
|
364
|
+
value: input.end
|
|
365
|
+
}, errorFactory));
|
|
321
366
|
const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.message || $guard(_exceptionable, {
|
|
322
367
|
path: _path + ".message",
|
|
323
368
|
expected: "string",
|
|
@@ -335,18 +380,18 @@ export const assertGuardFile = (input, errorFactory) => {
|
|
|
335
380
|
})(input, "$input", true);
|
|
336
381
|
};
|
|
337
382
|
export const stringifyFile = input => {
|
|
338
|
-
const $io1 = input => undefined === input.file || "string" === typeof input.file;
|
|
383
|
+
const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
|
|
339
384
|
const $io2 = input => "string" === typeof input.message;
|
|
340
385
|
const $string = __typia.json.createStringify.string;
|
|
341
386
|
const $tail = __typia.json.createStringify.tail;
|
|
342
|
-
const $so0 = input => `{"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"}
|
|
343
|
-
const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined}`}`)}}`;
|
|
387
|
+
const $so0 = input => `{"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"}}`;
|
|
388
|
+
const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined},`}${undefined === input.offset ? "" : `"offset":${undefined !== input.offset ? input.offset : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined}`}`)}}`;
|
|
344
389
|
return $so0(input);
|
|
345
390
|
};
|
|
346
391
|
export const assertStringifyFile = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
347
392
|
const __is = input => {
|
|
348
|
-
const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) &&
|
|
349
|
-
const $io1 = input => undefined === input.file || "string" === typeof input.file;
|
|
393
|
+
const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
|
|
394
|
+
const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset && !Number.isNaN(input.offset)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start)) && (undefined === input.end || "number" === typeof input.end && !Number.isNaN(input.end));
|
|
350
395
|
const $io2 = input => "string" === typeof input.message;
|
|
351
396
|
return "object" === typeof input && null !== input && $io0(input);
|
|
352
397
|
};
|
|
@@ -409,22 +454,6 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
|
|
|
409
454
|
path: _path + ".tags",
|
|
410
455
|
expected: "Array<string>",
|
|
411
456
|
value: input.tags
|
|
412
|
-
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
|
|
413
|
-
path: _path + ".error",
|
|
414
|
-
expected: "(Array<__type>.o1 | null)",
|
|
415
|
-
value: input.error
|
|
416
|
-
}, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
417
|
-
path: _path + ".error[" + _index3 + "]",
|
|
418
|
-
expected: "__type.o1",
|
|
419
|
-
value: elem
|
|
420
|
-
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
421
|
-
path: _path + ".error[" + _index3 + "]",
|
|
422
|
-
expected: "__type.o1",
|
|
423
|
-
value: elem
|
|
424
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
425
|
-
path: _path + ".error",
|
|
426
|
-
expected: "(Array<__type>.o1 | null)",
|
|
427
|
-
value: input.error
|
|
428
457
|
}, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
|
|
429
458
|
path: _path + ".resumable",
|
|
430
459
|
expected: "string",
|
|
@@ -453,12 +482,44 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
|
|
|
453
482
|
path: _path + ".btime",
|
|
454
483
|
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
455
484
|
value: input.btime
|
|
485
|
+
}, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
|
|
486
|
+
path: _path + ".completed",
|
|
487
|
+
expected: "boolean",
|
|
488
|
+
value: input.completed
|
|
489
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
|
|
490
|
+
path: _path + ".error",
|
|
491
|
+
expected: "(Array<__type>.o1 | null)",
|
|
492
|
+
value: input.error
|
|
493
|
+
}, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
494
|
+
path: _path + ".error[" + _index3 + "]",
|
|
495
|
+
expected: "__type.o1",
|
|
496
|
+
value: elem
|
|
497
|
+
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
498
|
+
path: _path + ".error[" + _index3 + "]",
|
|
499
|
+
expected: "__type.o1",
|
|
500
|
+
value: elem
|
|
501
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
502
|
+
path: _path + ".error",
|
|
503
|
+
expected: "(Array<__type>.o1 | null)",
|
|
504
|
+
value: input.error
|
|
456
505
|
}, errorFactory));
|
|
457
|
-
const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
506
|
+
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
458
507
|
path: _path + ".file",
|
|
459
508
|
expected: "(string | undefined)",
|
|
460
509
|
value: input.file
|
|
461
|
-
}, errorFactory)
|
|
510
|
+
}, errorFactory)) && (undefined === input.offset || "number" === typeof input.offset && !Number.isNaN(input.offset) || $guard(_exceptionable, {
|
|
511
|
+
path: _path + ".offset",
|
|
512
|
+
expected: "(number | undefined)",
|
|
513
|
+
value: input.offset
|
|
514
|
+
}, errorFactory)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start) || $guard(_exceptionable, {
|
|
515
|
+
path: _path + ".start",
|
|
516
|
+
expected: "(number | undefined)",
|
|
517
|
+
value: input.start
|
|
518
|
+
}, errorFactory)) && (undefined === input.end || "number" === typeof input.end && !Number.isNaN(input.end) || $guard(_exceptionable, {
|
|
519
|
+
path: _path + ".end",
|
|
520
|
+
expected: "(number | undefined)",
|
|
521
|
+
value: input.end
|
|
522
|
+
}, errorFactory));
|
|
462
523
|
const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.message || $guard(_exceptionable, {
|
|
463
524
|
path: _path + ".message",
|
|
464
525
|
expected: "string",
|
|
@@ -476,31 +537,31 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
|
|
|
476
537
|
})(input, "$input", true);
|
|
477
538
|
return input;
|
|
478
539
|
}; const stringify = input => {
|
|
479
|
-
const $io1 = input => undefined === input.file || "string" === typeof input.file;
|
|
540
|
+
const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
|
|
480
541
|
const $io2 = input => "string" === typeof input.message;
|
|
481
542
|
const $string = __typia.json.createAssertStringify.string;
|
|
482
543
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
483
|
-
const $so0 = input => `{"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"}
|
|
484
|
-
const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined}`}`)}}`;
|
|
544
|
+
const $so0 = input => `{"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"}}`;
|
|
545
|
+
const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined},`}${undefined === input.offset ? "" : `"offset":${undefined !== input.offset ? input.offset : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined}`}`)}}`;
|
|
485
546
|
return $so0(input);
|
|
486
547
|
}; return stringify(assert(input, errorFactory)); };
|
|
487
548
|
export const isFileStats = input => {
|
|
488
|
-
const $io0 = input => "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000)) && "boolean" === typeof input.uploading &&
|
|
489
|
-
const $io1 = input => undefined === input.file || "string" === typeof input.file;
|
|
549
|
+
const $io0 = input => (null === input.position || "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000))) && "boolean" === typeof input.uploading && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
|
|
550
|
+
const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
|
|
490
551
|
const $io2 = input => "string" === typeof input.message;
|
|
491
552
|
return "object" === typeof input && null !== input && $io0(input);
|
|
492
553
|
};
|
|
493
554
|
export const assertFileStats = (input, errorFactory) => {
|
|
494
555
|
const __is = input => {
|
|
495
|
-
const $io0 = input => "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000)) && "boolean" === typeof input.uploading &&
|
|
496
|
-
const $io1 = input => undefined === input.file || "string" === typeof input.file;
|
|
556
|
+
const $io0 = input => (null === input.position || "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000))) && "boolean" === typeof input.uploading && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
|
|
557
|
+
const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
|
|
497
558
|
const $io2 = input => "string" === typeof input.message;
|
|
498
559
|
return "object" === typeof input && null !== input && $io0(input);
|
|
499
560
|
};
|
|
500
561
|
if (false === __is(input))
|
|
501
562
|
((input, _path, _exceptionable = true) => {
|
|
502
563
|
const $guard = __typia.createAssert.guard;
|
|
503
|
-
const $ao0 = (input, _path, _exceptionable = true) => ("number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
|
|
564
|
+
const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
|
|
504
565
|
path: _path + ".position",
|
|
505
566
|
expected: "number & Minimum<0>",
|
|
506
567
|
value: input.position
|
|
@@ -510,16 +571,12 @@ export const assertFileStats = (input, errorFactory) => {
|
|
|
510
571
|
value: input.position
|
|
511
572
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
512
573
|
path: _path + ".position",
|
|
513
|
-
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
574
|
+
expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
|
|
514
575
|
value: input.position
|
|
515
576
|
}, errorFactory)) && ("boolean" === typeof input.uploading || $guard(_exceptionable, {
|
|
516
577
|
path: _path + ".uploading",
|
|
517
578
|
expected: "boolean",
|
|
518
579
|
value: input.uploading
|
|
519
|
-
}, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
|
|
520
|
-
path: _path + ".completed",
|
|
521
|
-
expected: "boolean",
|
|
522
|
-
value: input.completed
|
|
523
580
|
}, errorFactory)) && ((Array.isArray(input.zones) || $guard(_exceptionable, {
|
|
524
581
|
path: _path + ".zones",
|
|
525
582
|
expected: "Array<string>",
|
|
@@ -600,22 +657,6 @@ export const assertFileStats = (input, errorFactory) => {
|
|
|
600
657
|
path: _path + ".tags",
|
|
601
658
|
expected: "Array<string>",
|
|
602
659
|
value: input.tags
|
|
603
|
-
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
|
|
604
|
-
path: _path + ".error",
|
|
605
|
-
expected: "(Array<__type>.o1 | null)",
|
|
606
|
-
value: input.error
|
|
607
|
-
}, errorFactory)) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
608
|
-
path: _path + ".error[" + _index5 + "]",
|
|
609
|
-
expected: "__type.o1",
|
|
610
|
-
value: elem
|
|
611
|
-
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
612
|
-
path: _path + ".error[" + _index5 + "]",
|
|
613
|
-
expected: "__type.o1",
|
|
614
|
-
value: elem
|
|
615
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
616
|
-
path: _path + ".error",
|
|
617
|
-
expected: "(Array<__type>.o1 | null)",
|
|
618
|
-
value: input.error
|
|
619
660
|
}, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
|
|
620
661
|
path: _path + ".resumable",
|
|
621
662
|
expected: "string",
|
|
@@ -644,12 +685,44 @@ export const assertFileStats = (input, errorFactory) => {
|
|
|
644
685
|
path: _path + ".btime",
|
|
645
686
|
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
646
687
|
value: input.btime
|
|
688
|
+
}, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
|
|
689
|
+
path: _path + ".completed",
|
|
690
|
+
expected: "boolean",
|
|
691
|
+
value: input.completed
|
|
692
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
|
|
693
|
+
path: _path + ".error",
|
|
694
|
+
expected: "(Array<__type>.o1 | null)",
|
|
695
|
+
value: input.error
|
|
696
|
+
}, errorFactory)) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
697
|
+
path: _path + ".error[" + _index5 + "]",
|
|
698
|
+
expected: "__type.o1",
|
|
699
|
+
value: elem
|
|
700
|
+
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
701
|
+
path: _path + ".error[" + _index5 + "]",
|
|
702
|
+
expected: "__type.o1",
|
|
703
|
+
value: elem
|
|
704
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
705
|
+
path: _path + ".error",
|
|
706
|
+
expected: "(Array<__type>.o1 | null)",
|
|
707
|
+
value: input.error
|
|
647
708
|
}, errorFactory));
|
|
648
|
-
const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
709
|
+
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
649
710
|
path: _path + ".file",
|
|
650
711
|
expected: "(string | undefined)",
|
|
651
712
|
value: input.file
|
|
652
|
-
}, errorFactory)
|
|
713
|
+
}, errorFactory)) && (undefined === input.offset || "number" === typeof input.offset || $guard(_exceptionable, {
|
|
714
|
+
path: _path + ".offset",
|
|
715
|
+
expected: "(number | undefined)",
|
|
716
|
+
value: input.offset
|
|
717
|
+
}, errorFactory)) && (undefined === input.start || "number" === typeof input.start || $guard(_exceptionable, {
|
|
718
|
+
path: _path + ".start",
|
|
719
|
+
expected: "(number | undefined)",
|
|
720
|
+
value: input.start
|
|
721
|
+
}, errorFactory)) && (undefined === input.end || "number" === typeof input.end || $guard(_exceptionable, {
|
|
722
|
+
path: _path + ".end",
|
|
723
|
+
expected: "(number | undefined)",
|
|
724
|
+
value: input.end
|
|
725
|
+
}, errorFactory));
|
|
653
726
|
const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.message || $guard(_exceptionable, {
|
|
654
727
|
path: _path + ".message",
|
|
655
728
|
expected: "string",
|
|
@@ -671,20 +744,22 @@ export const randomFileStats = generator => {
|
|
|
671
744
|
const $generator = __typia.createRandom.generator;
|
|
672
745
|
const $pick = __typia.createRandom.pick;
|
|
673
746
|
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
674
|
-
position:
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
747
|
+
position: $pick([
|
|
748
|
+
() => null,
|
|
749
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([
|
|
750
|
+
{
|
|
751
|
+
name: "Minimum<0>",
|
|
752
|
+
kind: "minimum",
|
|
753
|
+
value: 0
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
name: "Type<\"uint64\">",
|
|
757
|
+
kind: "type",
|
|
758
|
+
value: "uint64"
|
|
759
|
+
}
|
|
760
|
+
]) ?? (generator?.integer ?? $generator.integer)(0, 10)
|
|
761
|
+
])(),
|
|
686
762
|
uploading: (generator?.boolean ?? $generator.boolean)(),
|
|
687
|
-
completed: (generator?.boolean ?? $generator.boolean)(),
|
|
688
763
|
zones: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
|
|
689
764
|
replicas: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
|
|
690
765
|
id: (generator?.customs ?? $generator.customs)?.string?.([
|
|
@@ -710,10 +785,6 @@ export const randomFileStats = generator => {
|
|
|
710
785
|
deleted: (generator?.boolean ?? $generator.boolean)(),
|
|
711
786
|
refs: (generator?.array ?? $generator.array)(() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)),
|
|
712
787
|
tags: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
|
|
713
|
-
error: $pick([
|
|
714
|
-
() => null,
|
|
715
|
-
() => (generator?.array ?? $generator.array)(() => $ro2(_recursive, _recursive ? 1 + _depth : _depth))
|
|
716
|
-
])(),
|
|
717
788
|
resumable: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
718
789
|
mimeType: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
719
790
|
hash: (generator?.customs ?? $generator.customs)?.string?.([
|
|
@@ -734,12 +805,29 @@ export const randomFileStats = generator => {
|
|
|
734
805
|
kind: "type",
|
|
735
806
|
value: "uint64"
|
|
736
807
|
}
|
|
737
|
-
]) ?? (generator?.integer ?? $generator.integer)(0, 10)
|
|
808
|
+
]) ?? (generator?.integer ?? $generator.integer)(0, 10),
|
|
809
|
+
completed: (generator?.boolean ?? $generator.boolean)(),
|
|
810
|
+
error: $pick([
|
|
811
|
+
() => null,
|
|
812
|
+
() => (generator?.array ?? $generator.array)(() => $ro2(_recursive, _recursive ? 1 + _depth : _depth))
|
|
813
|
+
])()
|
|
738
814
|
});
|
|
739
815
|
const $ro1 = (_recursive = false, _depth = 0) => ({
|
|
740
816
|
file: $pick([
|
|
741
817
|
() => undefined,
|
|
742
818
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
819
|
+
])(),
|
|
820
|
+
offset: $pick([
|
|
821
|
+
() => undefined,
|
|
822
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
823
|
+
])(),
|
|
824
|
+
start: $pick([
|
|
825
|
+
() => undefined,
|
|
826
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
827
|
+
])(),
|
|
828
|
+
end: $pick([
|
|
829
|
+
() => undefined,
|
|
830
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
743
831
|
])()
|
|
744
832
|
});
|
|
745
833
|
const $ro2 = (_recursive = false, _depth = 0) => ({
|
|
@@ -749,15 +837,15 @@ export const randomFileStats = generator => {
|
|
|
749
837
|
};
|
|
750
838
|
export const assertGuardFileStats = (input, errorFactory) => {
|
|
751
839
|
const __is = input => {
|
|
752
|
-
const $io0 = input => "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000)) && "boolean" === typeof input.uploading &&
|
|
753
|
-
const $io1 = input => undefined === input.file || "string" === typeof input.file;
|
|
840
|
+
const $io0 = input => (null === input.position || "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000))) && "boolean" === typeof input.uploading && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
|
|
841
|
+
const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
|
|
754
842
|
const $io2 = input => "string" === typeof input.message;
|
|
755
843
|
return "object" === typeof input && null !== input && $io0(input);
|
|
756
844
|
};
|
|
757
845
|
if (false === __is(input))
|
|
758
846
|
((input, _path, _exceptionable = true) => {
|
|
759
847
|
const $guard = __typia.createAssertGuard.guard;
|
|
760
|
-
const $ao0 = (input, _path, _exceptionable = true) => ("number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
|
|
848
|
+
const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
|
|
761
849
|
path: _path + ".position",
|
|
762
850
|
expected: "number & Minimum<0>",
|
|
763
851
|
value: input.position
|
|
@@ -767,16 +855,12 @@ export const assertGuardFileStats = (input, errorFactory) => {
|
|
|
767
855
|
value: input.position
|
|
768
856
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
769
857
|
path: _path + ".position",
|
|
770
|
-
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
858
|
+
expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
|
|
771
859
|
value: input.position
|
|
772
860
|
}, errorFactory)) && ("boolean" === typeof input.uploading || $guard(_exceptionable, {
|
|
773
861
|
path: _path + ".uploading",
|
|
774
862
|
expected: "boolean",
|
|
775
863
|
value: input.uploading
|
|
776
|
-
}, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
|
|
777
|
-
path: _path + ".completed",
|
|
778
|
-
expected: "boolean",
|
|
779
|
-
value: input.completed
|
|
780
864
|
}, errorFactory)) && ((Array.isArray(input.zones) || $guard(_exceptionable, {
|
|
781
865
|
path: _path + ".zones",
|
|
782
866
|
expected: "Array<string>",
|
|
@@ -857,22 +941,6 @@ export const assertGuardFileStats = (input, errorFactory) => {
|
|
|
857
941
|
path: _path + ".tags",
|
|
858
942
|
expected: "Array<string>",
|
|
859
943
|
value: input.tags
|
|
860
|
-
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
|
|
861
|
-
path: _path + ".error",
|
|
862
|
-
expected: "(Array<__type>.o1 | null)",
|
|
863
|
-
value: input.error
|
|
864
|
-
}, errorFactory)) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
865
|
-
path: _path + ".error[" + _index5 + "]",
|
|
866
|
-
expected: "__type.o1",
|
|
867
|
-
value: elem
|
|
868
|
-
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
869
|
-
path: _path + ".error[" + _index5 + "]",
|
|
870
|
-
expected: "__type.o1",
|
|
871
|
-
value: elem
|
|
872
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
873
|
-
path: _path + ".error",
|
|
874
|
-
expected: "(Array<__type>.o1 | null)",
|
|
875
|
-
value: input.error
|
|
876
944
|
}, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
|
|
877
945
|
path: _path + ".resumable",
|
|
878
946
|
expected: "string",
|
|
@@ -901,12 +969,44 @@ export const assertGuardFileStats = (input, errorFactory) => {
|
|
|
901
969
|
path: _path + ".btime",
|
|
902
970
|
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
903
971
|
value: input.btime
|
|
972
|
+
}, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
|
|
973
|
+
path: _path + ".completed",
|
|
974
|
+
expected: "boolean",
|
|
975
|
+
value: input.completed
|
|
976
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
|
|
977
|
+
path: _path + ".error",
|
|
978
|
+
expected: "(Array<__type>.o1 | null)",
|
|
979
|
+
value: input.error
|
|
980
|
+
}, errorFactory)) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
981
|
+
path: _path + ".error[" + _index5 + "]",
|
|
982
|
+
expected: "__type.o1",
|
|
983
|
+
value: elem
|
|
984
|
+
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
985
|
+
path: _path + ".error[" + _index5 + "]",
|
|
986
|
+
expected: "__type.o1",
|
|
987
|
+
value: elem
|
|
988
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
989
|
+
path: _path + ".error",
|
|
990
|
+
expected: "(Array<__type>.o1 | null)",
|
|
991
|
+
value: input.error
|
|
904
992
|
}, errorFactory));
|
|
905
|
-
const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
993
|
+
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
906
994
|
path: _path + ".file",
|
|
907
995
|
expected: "(string | undefined)",
|
|
908
996
|
value: input.file
|
|
909
|
-
}, errorFactory)
|
|
997
|
+
}, errorFactory)) && (undefined === input.offset || "number" === typeof input.offset || $guard(_exceptionable, {
|
|
998
|
+
path: _path + ".offset",
|
|
999
|
+
expected: "(number | undefined)",
|
|
1000
|
+
value: input.offset
|
|
1001
|
+
}, errorFactory)) && (undefined === input.start || "number" === typeof input.start || $guard(_exceptionable, {
|
|
1002
|
+
path: _path + ".start",
|
|
1003
|
+
expected: "(number | undefined)",
|
|
1004
|
+
value: input.start
|
|
1005
|
+
}, errorFactory)) && (undefined === input.end || "number" === typeof input.end || $guard(_exceptionable, {
|
|
1006
|
+
path: _path + ".end",
|
|
1007
|
+
expected: "(number | undefined)",
|
|
1008
|
+
value: input.end
|
|
1009
|
+
}, errorFactory));
|
|
910
1010
|
const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.message || $guard(_exceptionable, {
|
|
911
1011
|
path: _path + ".message",
|
|
912
1012
|
expected: "string",
|
|
@@ -924,25 +1024,25 @@ export const assertGuardFileStats = (input, errorFactory) => {
|
|
|
924
1024
|
})(input, "$input", true);
|
|
925
1025
|
};
|
|
926
1026
|
export const stringifyFileStats = input => {
|
|
927
|
-
const $io1 = input => undefined === input.file || "string" === typeof input.file;
|
|
1027
|
+
const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
|
|
928
1028
|
const $io2 = input => "string" === typeof input.message;
|
|
929
1029
|
const $string = __typia.json.createStringify.string;
|
|
930
1030
|
const $tail = __typia.json.createStringify.tail;
|
|
931
|
-
const $so0 = input => `{"position":${input.position},"uploading":${input.uploading},"
|
|
932
|
-
const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined}`}`)}}`;
|
|
1031
|
+
const $so0 = input => `{"position":${null !== input.position ? input.position : "null"},"uploading":${input.uploading},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"}}`;
|
|
1032
|
+
const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined},`}${undefined === input.offset ? "" : `"offset":${undefined !== input.offset ? input.offset : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined}`}`)}}`;
|
|
933
1033
|
return $so0(input);
|
|
934
1034
|
};
|
|
935
1035
|
export const assertStringifyFileStats = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
936
1036
|
const __is = input => {
|
|
937
|
-
const $io0 = input => "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000)) && "boolean" === typeof input.uploading &&
|
|
938
|
-
const $io1 = input => undefined === input.file || "string" === typeof input.file;
|
|
1037
|
+
const $io0 = input => (null === input.position || "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000))) && "boolean" === typeof input.uploading && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
|
|
1038
|
+
const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset && !Number.isNaN(input.offset)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start)) && (undefined === input.end || "number" === typeof input.end && !Number.isNaN(input.end));
|
|
939
1039
|
const $io2 = input => "string" === typeof input.message;
|
|
940
1040
|
return "object" === typeof input && null !== input && $io0(input);
|
|
941
1041
|
};
|
|
942
1042
|
if (false === __is(input))
|
|
943
1043
|
((input, _path, _exceptionable = true) => {
|
|
944
1044
|
const $guard = __typia.json.createAssertStringify.guard;
|
|
945
|
-
const $ao0 = (input, _path, _exceptionable = true) => ("number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
|
|
1045
|
+
const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
|
|
946
1046
|
path: _path + ".position",
|
|
947
1047
|
expected: "number & Minimum<0>",
|
|
948
1048
|
value: input.position
|
|
@@ -952,16 +1052,12 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
952
1052
|
value: input.position
|
|
953
1053
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
954
1054
|
path: _path + ".position",
|
|
955
|
-
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
1055
|
+
expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
|
|
956
1056
|
value: input.position
|
|
957
1057
|
}, errorFactory)) && ("boolean" === typeof input.uploading || $guard(_exceptionable, {
|
|
958
1058
|
path: _path + ".uploading",
|
|
959
1059
|
expected: "boolean",
|
|
960
1060
|
value: input.uploading
|
|
961
|
-
}, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
|
|
962
|
-
path: _path + ".completed",
|
|
963
|
-
expected: "boolean",
|
|
964
|
-
value: input.completed
|
|
965
1061
|
}, errorFactory)) && ((Array.isArray(input.zones) || $guard(_exceptionable, {
|
|
966
1062
|
path: _path + ".zones",
|
|
967
1063
|
expected: "Array<string>",
|
|
@@ -1042,22 +1138,6 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
1042
1138
|
path: _path + ".tags",
|
|
1043
1139
|
expected: "Array<string>",
|
|
1044
1140
|
value: input.tags
|
|
1045
|
-
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
|
|
1046
|
-
path: _path + ".error",
|
|
1047
|
-
expected: "(Array<__type>.o1 | null)",
|
|
1048
|
-
value: input.error
|
|
1049
|
-
}, errorFactory)) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
1050
|
-
path: _path + ".error[" + _index5 + "]",
|
|
1051
|
-
expected: "__type.o1",
|
|
1052
|
-
value: elem
|
|
1053
|
-
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
1054
|
-
path: _path + ".error[" + _index5 + "]",
|
|
1055
|
-
expected: "__type.o1",
|
|
1056
|
-
value: elem
|
|
1057
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
1058
|
-
path: _path + ".error",
|
|
1059
|
-
expected: "(Array<__type>.o1 | null)",
|
|
1060
|
-
value: input.error
|
|
1061
1141
|
}, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
|
|
1062
1142
|
path: _path + ".resumable",
|
|
1063
1143
|
expected: "string",
|
|
@@ -1086,12 +1166,44 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
1086
1166
|
path: _path + ".btime",
|
|
1087
1167
|
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
1088
1168
|
value: input.btime
|
|
1169
|
+
}, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
|
|
1170
|
+
path: _path + ".completed",
|
|
1171
|
+
expected: "boolean",
|
|
1172
|
+
value: input.completed
|
|
1173
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
|
|
1174
|
+
path: _path + ".error",
|
|
1175
|
+
expected: "(Array<__type>.o1 | null)",
|
|
1176
|
+
value: input.error
|
|
1177
|
+
}, errorFactory)) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
1178
|
+
path: _path + ".error[" + _index5 + "]",
|
|
1179
|
+
expected: "__type.o1",
|
|
1180
|
+
value: elem
|
|
1181
|
+
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
1182
|
+
path: _path + ".error[" + _index5 + "]",
|
|
1183
|
+
expected: "__type.o1",
|
|
1184
|
+
value: elem
|
|
1185
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1186
|
+
path: _path + ".error",
|
|
1187
|
+
expected: "(Array<__type>.o1 | null)",
|
|
1188
|
+
value: input.error
|
|
1089
1189
|
}, errorFactory));
|
|
1090
|
-
const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
1190
|
+
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
1091
1191
|
path: _path + ".file",
|
|
1092
1192
|
expected: "(string | undefined)",
|
|
1093
1193
|
value: input.file
|
|
1094
|
-
}, errorFactory)
|
|
1194
|
+
}, errorFactory)) && (undefined === input.offset || "number" === typeof input.offset && !Number.isNaN(input.offset) || $guard(_exceptionable, {
|
|
1195
|
+
path: _path + ".offset",
|
|
1196
|
+
expected: "(number | undefined)",
|
|
1197
|
+
value: input.offset
|
|
1198
|
+
}, errorFactory)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start) || $guard(_exceptionable, {
|
|
1199
|
+
path: _path + ".start",
|
|
1200
|
+
expected: "(number | undefined)",
|
|
1201
|
+
value: input.start
|
|
1202
|
+
}, errorFactory)) && (undefined === input.end || "number" === typeof input.end && !Number.isNaN(input.end) || $guard(_exceptionable, {
|
|
1203
|
+
path: _path + ".end",
|
|
1204
|
+
expected: "(number | undefined)",
|
|
1205
|
+
value: input.end
|
|
1206
|
+
}, errorFactory));
|
|
1095
1207
|
const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.message || $guard(_exceptionable, {
|
|
1096
1208
|
path: _path + ".message",
|
|
1097
1209
|
expected: "string",
|
|
@@ -1109,11 +1221,11 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
1109
1221
|
})(input, "$input", true);
|
|
1110
1222
|
return input;
|
|
1111
1223
|
}; const stringify = input => {
|
|
1112
|
-
const $io1 = input => undefined === input.file || "string" === typeof input.file;
|
|
1224
|
+
const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
|
|
1113
1225
|
const $io2 = input => "string" === typeof input.message;
|
|
1114
1226
|
const $string = __typia.json.createAssertStringify.string;
|
|
1115
1227
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
1116
|
-
const $so0 = input => `{"position":${input.position},"uploading":${input.uploading},"
|
|
1117
|
-
const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined}`}`)}}`;
|
|
1228
|
+
const $so0 = input => `{"position":${null !== input.position ? input.position : "null"},"uploading":${input.uploading},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"}}`;
|
|
1229
|
+
const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined},`}${undefined === input.offset ? "" : `"offset":${undefined !== input.offset ? input.offset : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined}`}`)}}`;
|
|
1118
1230
|
return $so0(input);
|
|
1119
1231
|
}; return stringify(assert(input, errorFactory)); };
|