@nxtedition/types 23.0.18 → 23.0.19
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/settings.d.ts +11 -4
- package/dist/common/settings.js +541 -408
- package/dist/domains/comment.d.ts +2 -2
- package/dist/domains/comment.js +299 -123
- package/dist/domains/settings.js +543 -403
- package/dist/schema.json +39 -2
- package/package.json +1 -1
package/dist/domains/comment.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import __typia from "typia";
|
|
2
2
|
export const isCommentDomainCommentRecord = input => {
|
|
3
3
|
const $io0 = input => (undefined === input.asset || "string" === typeof input.asset) && (null === input.content || undefined === input.content || "object" === typeof input.content && null !== input.content && $io1(input.content)) && (null === input.mediaRevisionId || undefined === input.mediaRevisionId || "string" === typeof input.mediaRevisionId) && (undefined === input.timecode || "object" === typeof input.timecode && null !== input.timecode && $io8(input.timecode)) && (undefined === input.replyTo || "string" === typeof input.replyTo);
|
|
4
|
-
const $io1 = input => "root" === input.type && 1 === input.version && "
|
|
5
|
-
const $io2 = input => "paragraph" === input.type && 1 === input.version && "
|
|
4
|
+
const $io1 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
5
|
+
const $io2 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && "number" === typeof input.textFormat && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
6
6
|
const $io3 = input => "text" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
7
7
|
const $io4 = input => "linebreak" === input.type && 1 === input.version;
|
|
8
8
|
const $io5 = input => "mention" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -32,8 +32,8 @@ export const isCommentDomainCommentRecord = input => {
|
|
|
32
32
|
export const assertCommentDomainCommentRecord = (input, errorFactory) => {
|
|
33
33
|
const __is = input => {
|
|
34
34
|
const $io0 = input => (undefined === input.asset || "string" === typeof input.asset) && (null === input.content || undefined === input.content || "object" === typeof input.content && null !== input.content && $io1(input.content)) && (null === input.mediaRevisionId || undefined === input.mediaRevisionId || "string" === typeof input.mediaRevisionId) && (undefined === input.timecode || "object" === typeof input.timecode && null !== input.timecode && $io8(input.timecode)) && (undefined === input.replyTo || "string" === typeof input.replyTo);
|
|
35
|
-
const $io1 = input => "root" === input.type && 1 === input.version && "
|
|
36
|
-
const $io2 = input => "paragraph" === input.type && 1 === input.version && "
|
|
35
|
+
const $io1 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
36
|
+
const $io2 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && "number" === typeof input.textFormat && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
37
37
|
const $io3 = input => "text" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
38
38
|
const $io4 = input => "linebreak" === input.type && 1 === input.version;
|
|
39
39
|
const $io5 = input => "mention" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -100,9 +100,9 @@ export const assertCommentDomainCommentRecord = (input, errorFactory) => {
|
|
|
100
100
|
path: _path + ".version",
|
|
101
101
|
expected: "1",
|
|
102
102
|
value: input.version
|
|
103
|
-
}, errorFactory)) && ("
|
|
103
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
104
104
|
path: _path + ".direction",
|
|
105
|
-
expected: "
|
|
105
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
106
106
|
value: input.direction
|
|
107
107
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
108
108
|
path: _path + ".format",
|
|
@@ -137,9 +137,9 @@ export const assertCommentDomainCommentRecord = (input, errorFactory) => {
|
|
|
137
137
|
path: _path + ".version",
|
|
138
138
|
expected: "1",
|
|
139
139
|
value: input.version
|
|
140
|
-
}, errorFactory)) && ("
|
|
140
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
141
141
|
path: _path + ".direction",
|
|
142
|
-
expected: "
|
|
142
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
143
143
|
value: input.direction
|
|
144
144
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
145
145
|
path: _path + ".format",
|
|
@@ -344,7 +344,11 @@ export const randomCommentDomainCommentRecord = generator => {
|
|
|
344
344
|
const $ro1 = (_recursive = true, _depth = 0) => ({
|
|
345
345
|
type: "root",
|
|
346
346
|
version: 1,
|
|
347
|
-
direction:
|
|
347
|
+
direction: $pick([
|
|
348
|
+
() => null,
|
|
349
|
+
() => "ltr",
|
|
350
|
+
() => "rtl"
|
|
351
|
+
])(),
|
|
348
352
|
format: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
349
353
|
indent: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
350
354
|
children: _recursive && 5 < _depth ? [] : 5 >= _depth ? (generator?.array ?? $generator.array)(() => $pick([
|
|
@@ -360,7 +364,11 @@ export const randomCommentDomainCommentRecord = generator => {
|
|
|
360
364
|
const $ro2 = (_recursive = true, _depth = 0) => ({
|
|
361
365
|
type: "paragraph",
|
|
362
366
|
version: 1,
|
|
363
|
-
direction:
|
|
367
|
+
direction: $pick([
|
|
368
|
+
() => null,
|
|
369
|
+
() => "ltr",
|
|
370
|
+
() => "rtl"
|
|
371
|
+
])(),
|
|
364
372
|
format: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
365
373
|
indent: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
366
374
|
textFormat: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
@@ -420,8 +428,8 @@ export const randomCommentDomainCommentRecord = generator => {
|
|
|
420
428
|
export const assertGuardCommentDomainCommentRecord = (input, errorFactory) => {
|
|
421
429
|
const __is = input => {
|
|
422
430
|
const $io0 = input => (undefined === input.asset || "string" === typeof input.asset) && (null === input.content || undefined === input.content || "object" === typeof input.content && null !== input.content && $io1(input.content)) && (null === input.mediaRevisionId || undefined === input.mediaRevisionId || "string" === typeof input.mediaRevisionId) && (undefined === input.timecode || "object" === typeof input.timecode && null !== input.timecode && $io8(input.timecode)) && (undefined === input.replyTo || "string" === typeof input.replyTo);
|
|
423
|
-
const $io1 = input => "root" === input.type && 1 === input.version && "
|
|
424
|
-
const $io2 = input => "paragraph" === input.type && 1 === input.version && "
|
|
431
|
+
const $io1 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
432
|
+
const $io2 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && "number" === typeof input.textFormat && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
425
433
|
const $io3 = input => "text" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
426
434
|
const $io4 = input => "linebreak" === input.type && 1 === input.version;
|
|
427
435
|
const $io5 = input => "mention" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -488,9 +496,9 @@ export const assertGuardCommentDomainCommentRecord = (input, errorFactory) => {
|
|
|
488
496
|
path: _path + ".version",
|
|
489
497
|
expected: "1",
|
|
490
498
|
value: input.version
|
|
491
|
-
}, errorFactory)) && ("
|
|
499
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
492
500
|
path: _path + ".direction",
|
|
493
|
-
expected: "
|
|
501
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
494
502
|
value: input.direction
|
|
495
503
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
496
504
|
path: _path + ".format",
|
|
@@ -525,9 +533,9 @@ export const assertGuardCommentDomainCommentRecord = (input, errorFactory) => {
|
|
|
525
533
|
path: _path + ".version",
|
|
526
534
|
expected: "1",
|
|
527
535
|
value: input.version
|
|
528
|
-
}, errorFactory)) && ("
|
|
536
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
529
537
|
path: _path + ".direction",
|
|
530
|
-
expected: "
|
|
538
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
531
539
|
value: input.direction
|
|
532
540
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
533
541
|
path: _path + ".format",
|
|
@@ -702,8 +710,8 @@ export const assertGuardCommentDomainCommentRecord = (input, errorFactory) => {
|
|
|
702
710
|
})(input, "$input", true);
|
|
703
711
|
};
|
|
704
712
|
export const stringifyCommentDomainCommentRecord = input => {
|
|
705
|
-
const $io1 = input => "root" === input.type && 1 === input.version && "
|
|
706
|
-
const $io2 = input => "paragraph" === input.type && 1 === input.version && "
|
|
713
|
+
const $io1 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
714
|
+
const $io2 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && "number" === typeof input.textFormat && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
707
715
|
const $io3 = input => "text" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
708
716
|
const $io4 = input => "linebreak" === input.type && 1 === input.version;
|
|
709
717
|
const $io5 = input => "mention" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -741,7 +749,16 @@ export const stringifyCommentDomainCommentRecord = input => {
|
|
|
741
749
|
expected: "\"root\"",
|
|
742
750
|
value: input.type
|
|
743
751
|
});
|
|
744
|
-
})()},"version":${input.version},"direction":${
|
|
752
|
+
})()},"version":${input.version},"direction":${null !== input.direction ? (() => {
|
|
753
|
+
if ("string" === typeof input.direction)
|
|
754
|
+
return $string(input.direction);
|
|
755
|
+
if ("string" === typeof input.direction)
|
|
756
|
+
return "\"" + input.direction + "\"";
|
|
757
|
+
$throws({
|
|
758
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
759
|
+
value: input.direction
|
|
760
|
+
});
|
|
761
|
+
})() : "null"},"format":${$string(input.format)},"indent":${input.indent},"children":${`[${input.children.map(elem => $su0(elem)).join(",")}]`}}`;
|
|
745
762
|
const $so2 = input => `{"type":${(() => {
|
|
746
763
|
if ("string" === typeof input.type)
|
|
747
764
|
return $string(input.type);
|
|
@@ -751,7 +768,16 @@ export const stringifyCommentDomainCommentRecord = input => {
|
|
|
751
768
|
expected: "\"paragraph\"",
|
|
752
769
|
value: input.type
|
|
753
770
|
});
|
|
754
|
-
})()},"version":${input.version},"direction":${
|
|
771
|
+
})()},"version":${input.version},"direction":${null !== input.direction ? (() => {
|
|
772
|
+
if ("string" === typeof input.direction)
|
|
773
|
+
return $string(input.direction);
|
|
774
|
+
if ("string" === typeof input.direction)
|
|
775
|
+
return "\"" + input.direction + "\"";
|
|
776
|
+
$throws({
|
|
777
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
778
|
+
value: input.direction
|
|
779
|
+
});
|
|
780
|
+
})() : "null"},"format":${$string(input.format)},"indent":${input.indent},"textFormat":${input.textFormat},"textStyle":${$string(input.textStyle)},"children":${`[${input.children.map(elem => $su0(elem)).join(",")}]`}}`;
|
|
755
781
|
const $so3 = input => `{"type":${(() => {
|
|
756
782
|
if ("string" === typeof input.type)
|
|
757
783
|
return $string(input.type);
|
|
@@ -829,8 +855,8 @@ export const stringifyCommentDomainCommentRecord = input => {
|
|
|
829
855
|
export const assertStringifyCommentDomainCommentRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
830
856
|
const __is = input => {
|
|
831
857
|
const $io0 = input => (undefined === input.asset || "string" === typeof input.asset) && (null === input.content || undefined === input.content || "object" === typeof input.content && null !== input.content && $io1(input.content)) && (null === input.mediaRevisionId || undefined === input.mediaRevisionId || "string" === typeof input.mediaRevisionId) && (undefined === input.timecode || "object" === typeof input.timecode && null !== input.timecode && $io8(input.timecode)) && (undefined === input.replyTo || "string" === typeof input.replyTo);
|
|
832
|
-
const $io1 = input => "root" === input.type && 1 === input.version && "
|
|
833
|
-
const $io2 = input => "paragraph" === input.type && 1 === input.version && "
|
|
858
|
+
const $io1 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && ("number" === typeof input.indent && !Number.isNaN(input.indent)) && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
859
|
+
const $io2 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && ("number" === typeof input.indent && !Number.isNaN(input.indent)) && ("number" === typeof input.textFormat && !Number.isNaN(input.textFormat)) && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
834
860
|
const $io3 = input => "text" === input.type && 1 === input.version && ("number" === typeof input.detail && !Number.isNaN(input.detail)) && ("number" === typeof input.format && !Number.isNaN(input.format)) && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
835
861
|
const $io4 = input => "linebreak" === input.type && 1 === input.version;
|
|
836
862
|
const $io5 = input => "mention" === input.type && 1 === input.version && ("number" === typeof input.detail && !Number.isNaN(input.detail)) && ("number" === typeof input.format && !Number.isNaN(input.format)) && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -897,9 +923,9 @@ export const assertStringifyCommentDomainCommentRecord = (input, errorFactory) =
|
|
|
897
923
|
path: _path + ".version",
|
|
898
924
|
expected: "1",
|
|
899
925
|
value: input.version
|
|
900
|
-
}, errorFactory)) && ("
|
|
926
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
901
927
|
path: _path + ".direction",
|
|
902
|
-
expected: "
|
|
928
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
903
929
|
value: input.direction
|
|
904
930
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
905
931
|
path: _path + ".format",
|
|
@@ -934,9 +960,9 @@ export const assertStringifyCommentDomainCommentRecord = (input, errorFactory) =
|
|
|
934
960
|
path: _path + ".version",
|
|
935
961
|
expected: "1",
|
|
936
962
|
value: input.version
|
|
937
|
-
}, errorFactory)) && ("
|
|
963
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
938
964
|
path: _path + ".direction",
|
|
939
|
-
expected: "
|
|
965
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
940
966
|
value: input.direction
|
|
941
967
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
942
968
|
path: _path + ".format",
|
|
@@ -1111,8 +1137,8 @@ export const assertStringifyCommentDomainCommentRecord = (input, errorFactory) =
|
|
|
1111
1137
|
})(input, "$input", true);
|
|
1112
1138
|
return input;
|
|
1113
1139
|
}; const stringify = input => {
|
|
1114
|
-
const $io1 = input => "root" === input.type && 1 === input.version && "
|
|
1115
|
-
const $io2 = input => "paragraph" === input.type && 1 === input.version && "
|
|
1140
|
+
const $io1 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
1141
|
+
const $io2 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && "number" === typeof input.textFormat && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
1116
1142
|
const $io3 = input => "text" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
1117
1143
|
const $io4 = input => "linebreak" === input.type && 1 === input.version;
|
|
1118
1144
|
const $io5 = input => "mention" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -1150,7 +1176,16 @@ export const assertStringifyCommentDomainCommentRecord = (input, errorFactory) =
|
|
|
1150
1176
|
expected: "\"root\"",
|
|
1151
1177
|
value: input.type
|
|
1152
1178
|
});
|
|
1153
|
-
})()},"version":${input.version},"direction":${
|
|
1179
|
+
})()},"version":${input.version},"direction":${null !== input.direction ? (() => {
|
|
1180
|
+
if ("string" === typeof input.direction)
|
|
1181
|
+
return $string(input.direction);
|
|
1182
|
+
if ("string" === typeof input.direction)
|
|
1183
|
+
return "\"" + input.direction + "\"";
|
|
1184
|
+
$throws({
|
|
1185
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
1186
|
+
value: input.direction
|
|
1187
|
+
});
|
|
1188
|
+
})() : "null"},"format":${$string(input.format)},"indent":${input.indent},"children":${`[${input.children.map(elem => $su0(elem)).join(",")}]`}}`;
|
|
1154
1189
|
const $so2 = input => `{"type":${(() => {
|
|
1155
1190
|
if ("string" === typeof input.type)
|
|
1156
1191
|
return $string(input.type);
|
|
@@ -1160,7 +1195,16 @@ export const assertStringifyCommentDomainCommentRecord = (input, errorFactory) =
|
|
|
1160
1195
|
expected: "\"paragraph\"",
|
|
1161
1196
|
value: input.type
|
|
1162
1197
|
});
|
|
1163
|
-
})()},"version":${input.version},"direction":${
|
|
1198
|
+
})()},"version":${input.version},"direction":${null !== input.direction ? (() => {
|
|
1199
|
+
if ("string" === typeof input.direction)
|
|
1200
|
+
return $string(input.direction);
|
|
1201
|
+
if ("string" === typeof input.direction)
|
|
1202
|
+
return "\"" + input.direction + "\"";
|
|
1203
|
+
$throws({
|
|
1204
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
1205
|
+
value: input.direction
|
|
1206
|
+
});
|
|
1207
|
+
})() : "null"},"format":${$string(input.format)},"indent":${input.indent},"textFormat":${input.textFormat},"textStyle":${$string(input.textStyle)},"children":${`[${input.children.map(elem => $su0(elem)).join(",")}]`}}`;
|
|
1164
1208
|
const $so3 = input => `{"type":${(() => {
|
|
1165
1209
|
if ("string" === typeof input.type)
|
|
1166
1210
|
return $string(input.type);
|
|
@@ -1445,8 +1489,8 @@ export const assertStringifyCommentReactionsProvidedRecord = (input, errorFactor
|
|
|
1445
1489
|
return $so0(input);
|
|
1446
1490
|
}; return stringify(assert(input, errorFactory)); };
|
|
1447
1491
|
export const isSerializedNode = input => {
|
|
1448
|
-
const $io0 = input => "root" === input.type && 1 === input.version && "
|
|
1449
|
-
const $io1 = input => "paragraph" === input.type && 1 === input.version && "
|
|
1492
|
+
const $io0 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
1493
|
+
const $io1 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && "number" === typeof input.textFormat && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
1450
1494
|
const $io2 = input => "text" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
1451
1495
|
const $io3 = input => "linebreak" === input.type && 1 === input.version;
|
|
1452
1496
|
const $io4 = input => "mention" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -1474,8 +1518,8 @@ export const isSerializedNode = input => {
|
|
|
1474
1518
|
};
|
|
1475
1519
|
export const assertSerializedNode = (input, errorFactory) => {
|
|
1476
1520
|
const __is = input => {
|
|
1477
|
-
const $io0 = input => "root" === input.type && 1 === input.version && "
|
|
1478
|
-
const $io1 = input => "paragraph" === input.type && 1 === input.version && "
|
|
1521
|
+
const $io0 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
1522
|
+
const $io1 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && "number" === typeof input.textFormat && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
1479
1523
|
const $io2 = input => "text" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
1480
1524
|
const $io3 = input => "linebreak" === input.type && 1 === input.version;
|
|
1481
1525
|
const $io4 = input => "mention" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -1512,9 +1556,9 @@ export const assertSerializedNode = (input, errorFactory) => {
|
|
|
1512
1556
|
path: _path + ".version",
|
|
1513
1557
|
expected: "1",
|
|
1514
1558
|
value: input.version
|
|
1515
|
-
}, errorFactory)) && ("
|
|
1559
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
1516
1560
|
path: _path + ".direction",
|
|
1517
|
-
expected: "
|
|
1561
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
1518
1562
|
value: input.direction
|
|
1519
1563
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
1520
1564
|
path: _path + ".format",
|
|
@@ -1549,9 +1593,9 @@ export const assertSerializedNode = (input, errorFactory) => {
|
|
|
1549
1593
|
path: _path + ".version",
|
|
1550
1594
|
expected: "1",
|
|
1551
1595
|
value: input.version
|
|
1552
|
-
}, errorFactory)) && ("
|
|
1596
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
1553
1597
|
path: _path + ".direction",
|
|
1554
|
-
expected: "
|
|
1598
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
1555
1599
|
value: input.direction
|
|
1556
1600
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
1557
1601
|
path: _path + ".format",
|
|
@@ -1718,12 +1762,16 @@ export const assertSerializedNode = (input, errorFactory) => {
|
|
|
1718
1762
|
return input;
|
|
1719
1763
|
};
|
|
1720
1764
|
export const randomSerializedNode = generator => {
|
|
1721
|
-
const $generator = __typia.createRandom.generator;
|
|
1722
1765
|
const $pick = __typia.createRandom.pick;
|
|
1766
|
+
const $generator = __typia.createRandom.generator;
|
|
1723
1767
|
const $ro0 = (_recursive = true, _depth = 0) => ({
|
|
1724
1768
|
type: "root",
|
|
1725
1769
|
version: 1,
|
|
1726
|
-
direction:
|
|
1770
|
+
direction: $pick([
|
|
1771
|
+
() => null,
|
|
1772
|
+
() => "ltr",
|
|
1773
|
+
() => "rtl"
|
|
1774
|
+
])(),
|
|
1727
1775
|
format: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
1728
1776
|
indent: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
1729
1777
|
children: _recursive && 5 < _depth ? [] : 5 >= _depth ? (generator?.array ?? $generator.array)(() => $pick([
|
|
@@ -1739,7 +1787,11 @@ export const randomSerializedNode = generator => {
|
|
|
1739
1787
|
const $ro1 = (_recursive = true, _depth = 0) => ({
|
|
1740
1788
|
type: "paragraph",
|
|
1741
1789
|
version: 1,
|
|
1742
|
-
direction:
|
|
1790
|
+
direction: $pick([
|
|
1791
|
+
() => null,
|
|
1792
|
+
() => "ltr",
|
|
1793
|
+
() => "rtl"
|
|
1794
|
+
])(),
|
|
1743
1795
|
format: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
1744
1796
|
indent: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
1745
1797
|
textFormat: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
@@ -1799,8 +1851,8 @@ export const randomSerializedNode = generator => {
|
|
|
1799
1851
|
};
|
|
1800
1852
|
export const assertGuardSerializedNode = (input, errorFactory) => {
|
|
1801
1853
|
const __is = input => {
|
|
1802
|
-
const $io0 = input => "root" === input.type && 1 === input.version && "
|
|
1803
|
-
const $io1 = input => "paragraph" === input.type && 1 === input.version && "
|
|
1854
|
+
const $io0 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
1855
|
+
const $io1 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && "number" === typeof input.textFormat && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
1804
1856
|
const $io2 = input => "text" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
1805
1857
|
const $io3 = input => "linebreak" === input.type && 1 === input.version;
|
|
1806
1858
|
const $io4 = input => "mention" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -1837,9 +1889,9 @@ export const assertGuardSerializedNode = (input, errorFactory) => {
|
|
|
1837
1889
|
path: _path + ".version",
|
|
1838
1890
|
expected: "1",
|
|
1839
1891
|
value: input.version
|
|
1840
|
-
}, errorFactory)) && ("
|
|
1892
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
1841
1893
|
path: _path + ".direction",
|
|
1842
|
-
expected: "
|
|
1894
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
1843
1895
|
value: input.direction
|
|
1844
1896
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
1845
1897
|
path: _path + ".format",
|
|
@@ -1874,9 +1926,9 @@ export const assertGuardSerializedNode = (input, errorFactory) => {
|
|
|
1874
1926
|
path: _path + ".version",
|
|
1875
1927
|
expected: "1",
|
|
1876
1928
|
value: input.version
|
|
1877
|
-
}, errorFactory)) && ("
|
|
1929
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
1878
1930
|
path: _path + ".direction",
|
|
1879
|
-
expected: "
|
|
1931
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
1880
1932
|
value: input.direction
|
|
1881
1933
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
1882
1934
|
path: _path + ".format",
|
|
@@ -2042,8 +2094,8 @@ export const assertGuardSerializedNode = (input, errorFactory) => {
|
|
|
2042
2094
|
})(input, "$input", true);
|
|
2043
2095
|
};
|
|
2044
2096
|
export const stringifySerializedNode = input => {
|
|
2045
|
-
const $io0 = input => "root" === input.type && 1 === input.version && "
|
|
2046
|
-
const $io1 = input => "paragraph" === input.type && 1 === input.version && "
|
|
2097
|
+
const $io0 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
2098
|
+
const $io1 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && "number" === typeof input.textFormat && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
2047
2099
|
const $io2 = input => "text" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
2048
2100
|
const $io3 = input => "linebreak" === input.type && 1 === input.version;
|
|
2049
2101
|
const $io4 = input => "mention" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -2078,7 +2130,16 @@ export const stringifySerializedNode = input => {
|
|
|
2078
2130
|
expected: "\"root\"",
|
|
2079
2131
|
value: input.type
|
|
2080
2132
|
});
|
|
2081
|
-
})()},"version":${input.version},"direction":${
|
|
2133
|
+
})()},"version":${input.version},"direction":${null !== input.direction ? (() => {
|
|
2134
|
+
if ("string" === typeof input.direction)
|
|
2135
|
+
return $string(input.direction);
|
|
2136
|
+
if ("string" === typeof input.direction)
|
|
2137
|
+
return "\"" + input.direction + "\"";
|
|
2138
|
+
$throws({
|
|
2139
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
2140
|
+
value: input.direction
|
|
2141
|
+
});
|
|
2142
|
+
})() : "null"},"format":${$string(input.format)},"indent":${input.indent},"children":${`[${input.children.map(elem => $su0(elem)).join(",")}]`}}`;
|
|
2082
2143
|
const $so1 = input => `{"type":${(() => {
|
|
2083
2144
|
if ("string" === typeof input.type)
|
|
2084
2145
|
return $string(input.type);
|
|
@@ -2088,7 +2149,16 @@ export const stringifySerializedNode = input => {
|
|
|
2088
2149
|
expected: "\"paragraph\"",
|
|
2089
2150
|
value: input.type
|
|
2090
2151
|
});
|
|
2091
|
-
})()},"version":${input.version},"direction":${
|
|
2152
|
+
})()},"version":${input.version},"direction":${null !== input.direction ? (() => {
|
|
2153
|
+
if ("string" === typeof input.direction)
|
|
2154
|
+
return $string(input.direction);
|
|
2155
|
+
if ("string" === typeof input.direction)
|
|
2156
|
+
return "\"" + input.direction + "\"";
|
|
2157
|
+
$throws({
|
|
2158
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
2159
|
+
value: input.direction
|
|
2160
|
+
});
|
|
2161
|
+
})() : "null"},"format":${$string(input.format)},"indent":${input.indent},"textFormat":${input.textFormat},"textStyle":${$string(input.textStyle)},"children":${`[${input.children.map(elem => $su0(elem)).join(",")}]`}}`;
|
|
2092
2162
|
const $so2 = input => `{"type":${(() => {
|
|
2093
2163
|
if ("string" === typeof input.type)
|
|
2094
2164
|
return $string(input.type);
|
|
@@ -2164,8 +2234,8 @@ export const stringifySerializedNode = input => {
|
|
|
2164
2234
|
};
|
|
2165
2235
|
export const assertStringifySerializedNode = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
2166
2236
|
const __is = input => {
|
|
2167
|
-
const $io0 = input => "root" === input.type && 1 === input.version && "
|
|
2168
|
-
const $io1 = input => "paragraph" === input.type && 1 === input.version && "
|
|
2237
|
+
const $io0 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && ("number" === typeof input.indent && !Number.isNaN(input.indent)) && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
2238
|
+
const $io1 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && ("number" === typeof input.indent && !Number.isNaN(input.indent)) && ("number" === typeof input.textFormat && !Number.isNaN(input.textFormat)) && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
2169
2239
|
const $io2 = input => "text" === input.type && 1 === input.version && ("number" === typeof input.detail && !Number.isNaN(input.detail)) && ("number" === typeof input.format && !Number.isNaN(input.format)) && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
2170
2240
|
const $io3 = input => "linebreak" === input.type && 1 === input.version;
|
|
2171
2241
|
const $io4 = input => "mention" === input.type && 1 === input.version && ("number" === typeof input.detail && !Number.isNaN(input.detail)) && ("number" === typeof input.format && !Number.isNaN(input.format)) && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -2202,9 +2272,9 @@ export const assertStringifySerializedNode = (input, errorFactory) => { const as
|
|
|
2202
2272
|
path: _path + ".version",
|
|
2203
2273
|
expected: "1",
|
|
2204
2274
|
value: input.version
|
|
2205
|
-
}, errorFactory)) && ("
|
|
2275
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
2206
2276
|
path: _path + ".direction",
|
|
2207
|
-
expected: "
|
|
2277
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
2208
2278
|
value: input.direction
|
|
2209
2279
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
2210
2280
|
path: _path + ".format",
|
|
@@ -2239,9 +2309,9 @@ export const assertStringifySerializedNode = (input, errorFactory) => { const as
|
|
|
2239
2309
|
path: _path + ".version",
|
|
2240
2310
|
expected: "1",
|
|
2241
2311
|
value: input.version
|
|
2242
|
-
}, errorFactory)) && ("
|
|
2312
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
2243
2313
|
path: _path + ".direction",
|
|
2244
|
-
expected: "
|
|
2314
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
2245
2315
|
value: input.direction
|
|
2246
2316
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
2247
2317
|
path: _path + ".format",
|
|
@@ -2407,8 +2477,8 @@ export const assertStringifySerializedNode = (input, errorFactory) => { const as
|
|
|
2407
2477
|
})(input, "$input", true);
|
|
2408
2478
|
return input;
|
|
2409
2479
|
}; const stringify = input => {
|
|
2410
|
-
const $io0 = input => "root" === input.type && 1 === input.version && "
|
|
2411
|
-
const $io1 = input => "paragraph" === input.type && 1 === input.version && "
|
|
2480
|
+
const $io0 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
2481
|
+
const $io1 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && "number" === typeof input.textFormat && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
2412
2482
|
const $io2 = input => "text" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
2413
2483
|
const $io3 = input => "linebreak" === input.type && 1 === input.version;
|
|
2414
2484
|
const $io4 = input => "mention" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -2443,7 +2513,16 @@ export const assertStringifySerializedNode = (input, errorFactory) => { const as
|
|
|
2443
2513
|
expected: "\"root\"",
|
|
2444
2514
|
value: input.type
|
|
2445
2515
|
});
|
|
2446
|
-
})()},"version":${input.version},"direction":${
|
|
2516
|
+
})()},"version":${input.version},"direction":${null !== input.direction ? (() => {
|
|
2517
|
+
if ("string" === typeof input.direction)
|
|
2518
|
+
return $string(input.direction);
|
|
2519
|
+
if ("string" === typeof input.direction)
|
|
2520
|
+
return "\"" + input.direction + "\"";
|
|
2521
|
+
$throws({
|
|
2522
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
2523
|
+
value: input.direction
|
|
2524
|
+
});
|
|
2525
|
+
})() : "null"},"format":${$string(input.format)},"indent":${input.indent},"children":${`[${input.children.map(elem => $su0(elem)).join(",")}]`}}`;
|
|
2447
2526
|
const $so1 = input => `{"type":${(() => {
|
|
2448
2527
|
if ("string" === typeof input.type)
|
|
2449
2528
|
return $string(input.type);
|
|
@@ -2453,7 +2532,16 @@ export const assertStringifySerializedNode = (input, errorFactory) => { const as
|
|
|
2453
2532
|
expected: "\"paragraph\"",
|
|
2454
2533
|
value: input.type
|
|
2455
2534
|
});
|
|
2456
|
-
})()},"version":${input.version},"direction":${
|
|
2535
|
+
})()},"version":${input.version},"direction":${null !== input.direction ? (() => {
|
|
2536
|
+
if ("string" === typeof input.direction)
|
|
2537
|
+
return $string(input.direction);
|
|
2538
|
+
if ("string" === typeof input.direction)
|
|
2539
|
+
return "\"" + input.direction + "\"";
|
|
2540
|
+
$throws({
|
|
2541
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
2542
|
+
value: input.direction
|
|
2543
|
+
});
|
|
2544
|
+
})() : "null"},"format":${$string(input.format)},"indent":${input.indent},"textFormat":${input.textFormat},"textStyle":${$string(input.textStyle)},"children":${`[${input.children.map(elem => $su0(elem)).join(",")}]`}}`;
|
|
2457
2545
|
const $so2 = input => `{"type":${(() => {
|
|
2458
2546
|
if ("string" === typeof input.type)
|
|
2459
2547
|
return $string(input.type);
|
|
@@ -2528,8 +2616,8 @@ export const assertStringifySerializedNode = (input, errorFactory) => { const as
|
|
|
2528
2616
|
return $su0(input);
|
|
2529
2617
|
}; return stringify(assert(input, errorFactory)); };
|
|
2530
2618
|
export const isSerializedRootNode = input => {
|
|
2531
|
-
const $io0 = input => "root" === input.type && 1 === input.version && "
|
|
2532
|
-
const $io1 = input => "paragraph" === input.type && 1 === input.version && "
|
|
2619
|
+
const $io0 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
2620
|
+
const $io1 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && "number" === typeof input.textFormat && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
2533
2621
|
const $io2 = input => "text" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
2534
2622
|
const $io3 = input => "linebreak" === input.type && 1 === input.version;
|
|
2535
2623
|
const $io4 = input => "mention" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -2557,8 +2645,8 @@ export const isSerializedRootNode = input => {
|
|
|
2557
2645
|
};
|
|
2558
2646
|
export const assertSerializedRootNode = (input, errorFactory) => {
|
|
2559
2647
|
const __is = input => {
|
|
2560
|
-
const $io0 = input => "root" === input.type && 1 === input.version && "
|
|
2561
|
-
const $io1 = input => "paragraph" === input.type && 1 === input.version && "
|
|
2648
|
+
const $io0 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
2649
|
+
const $io1 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && "number" === typeof input.textFormat && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
2562
2650
|
const $io2 = input => "text" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
2563
2651
|
const $io3 = input => "linebreak" === input.type && 1 === input.version;
|
|
2564
2652
|
const $io4 = input => "mention" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -2595,9 +2683,9 @@ export const assertSerializedRootNode = (input, errorFactory) => {
|
|
|
2595
2683
|
path: _path + ".version",
|
|
2596
2684
|
expected: "1",
|
|
2597
2685
|
value: input.version
|
|
2598
|
-
}, errorFactory)) && ("
|
|
2686
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
2599
2687
|
path: _path + ".direction",
|
|
2600
|
-
expected: "
|
|
2688
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
2601
2689
|
value: input.direction
|
|
2602
2690
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
2603
2691
|
path: _path + ".format",
|
|
@@ -2632,9 +2720,9 @@ export const assertSerializedRootNode = (input, errorFactory) => {
|
|
|
2632
2720
|
path: _path + ".version",
|
|
2633
2721
|
expected: "1",
|
|
2634
2722
|
value: input.version
|
|
2635
|
-
}, errorFactory)) && ("
|
|
2723
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
2636
2724
|
path: _path + ".direction",
|
|
2637
|
-
expected: "
|
|
2725
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
2638
2726
|
value: input.direction
|
|
2639
2727
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
2640
2728
|
path: _path + ".format",
|
|
@@ -2801,12 +2889,16 @@ export const assertSerializedRootNode = (input, errorFactory) => {
|
|
|
2801
2889
|
return input;
|
|
2802
2890
|
};
|
|
2803
2891
|
export const randomSerializedRootNode = generator => {
|
|
2804
|
-
const $generator = __typia.createRandom.generator;
|
|
2805
2892
|
const $pick = __typia.createRandom.pick;
|
|
2893
|
+
const $generator = __typia.createRandom.generator;
|
|
2806
2894
|
const $ro0 = (_recursive = true, _depth = 0) => ({
|
|
2807
2895
|
type: "root",
|
|
2808
2896
|
version: 1,
|
|
2809
|
-
direction:
|
|
2897
|
+
direction: $pick([
|
|
2898
|
+
() => null,
|
|
2899
|
+
() => "ltr",
|
|
2900
|
+
() => "rtl"
|
|
2901
|
+
])(),
|
|
2810
2902
|
format: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
2811
2903
|
indent: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
2812
2904
|
children: _recursive && 5 < _depth ? [] : 5 >= _depth ? (generator?.array ?? $generator.array)(() => $pick([
|
|
@@ -2822,7 +2914,11 @@ export const randomSerializedRootNode = generator => {
|
|
|
2822
2914
|
const $ro1 = (_recursive = true, _depth = 0) => ({
|
|
2823
2915
|
type: "paragraph",
|
|
2824
2916
|
version: 1,
|
|
2825
|
-
direction:
|
|
2917
|
+
direction: $pick([
|
|
2918
|
+
() => null,
|
|
2919
|
+
() => "ltr",
|
|
2920
|
+
() => "rtl"
|
|
2921
|
+
])(),
|
|
2826
2922
|
format: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
2827
2923
|
indent: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
2828
2924
|
textFormat: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
@@ -2874,8 +2970,8 @@ export const randomSerializedRootNode = generator => {
|
|
|
2874
2970
|
};
|
|
2875
2971
|
export const assertGuardSerializedRootNode = (input, errorFactory) => {
|
|
2876
2972
|
const __is = input => {
|
|
2877
|
-
const $io0 = input => "root" === input.type && 1 === input.version && "
|
|
2878
|
-
const $io1 = input => "paragraph" === input.type && 1 === input.version && "
|
|
2973
|
+
const $io0 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
2974
|
+
const $io1 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && "number" === typeof input.textFormat && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
2879
2975
|
const $io2 = input => "text" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
2880
2976
|
const $io3 = input => "linebreak" === input.type && 1 === input.version;
|
|
2881
2977
|
const $io4 = input => "mention" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -2912,9 +3008,9 @@ export const assertGuardSerializedRootNode = (input, errorFactory) => {
|
|
|
2912
3008
|
path: _path + ".version",
|
|
2913
3009
|
expected: "1",
|
|
2914
3010
|
value: input.version
|
|
2915
|
-
}, errorFactory)) && ("
|
|
3011
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
2916
3012
|
path: _path + ".direction",
|
|
2917
|
-
expected: "
|
|
3013
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
2918
3014
|
value: input.direction
|
|
2919
3015
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
2920
3016
|
path: _path + ".format",
|
|
@@ -2949,9 +3045,9 @@ export const assertGuardSerializedRootNode = (input, errorFactory) => {
|
|
|
2949
3045
|
path: _path + ".version",
|
|
2950
3046
|
expected: "1",
|
|
2951
3047
|
value: input.version
|
|
2952
|
-
}, errorFactory)) && ("
|
|
3048
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
2953
3049
|
path: _path + ".direction",
|
|
2954
|
-
expected: "
|
|
3050
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
2955
3051
|
value: input.direction
|
|
2956
3052
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
2957
3053
|
path: _path + ".format",
|
|
@@ -3117,8 +3213,8 @@ export const assertGuardSerializedRootNode = (input, errorFactory) => {
|
|
|
3117
3213
|
})(input, "$input", true);
|
|
3118
3214
|
};
|
|
3119
3215
|
export const stringifySerializedRootNode = input => {
|
|
3120
|
-
const $io0 = input => "root" === input.type && 1 === input.version && "
|
|
3121
|
-
const $io1 = input => "paragraph" === input.type && 1 === input.version && "
|
|
3216
|
+
const $io0 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
3217
|
+
const $io1 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && "number" === typeof input.textFormat && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
3122
3218
|
const $io2 = input => "text" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
3123
3219
|
const $io3 = input => "linebreak" === input.type && 1 === input.version;
|
|
3124
3220
|
const $io4 = input => "mention" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -3153,7 +3249,16 @@ export const stringifySerializedRootNode = input => {
|
|
|
3153
3249
|
expected: "\"root\"",
|
|
3154
3250
|
value: input.type
|
|
3155
3251
|
});
|
|
3156
|
-
})()},"version":${input.version},"direction":${
|
|
3252
|
+
})()},"version":${input.version},"direction":${null !== input.direction ? (() => {
|
|
3253
|
+
if ("string" === typeof input.direction)
|
|
3254
|
+
return $string(input.direction);
|
|
3255
|
+
if ("string" === typeof input.direction)
|
|
3256
|
+
return "\"" + input.direction + "\"";
|
|
3257
|
+
$throws({
|
|
3258
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
3259
|
+
value: input.direction
|
|
3260
|
+
});
|
|
3261
|
+
})() : "null"},"format":${$string(input.format)},"indent":${input.indent},"children":${`[${input.children.map(elem => $su0(elem)).join(",")}]`}}`;
|
|
3157
3262
|
const $so1 = input => `{"type":${(() => {
|
|
3158
3263
|
if ("string" === typeof input.type)
|
|
3159
3264
|
return $string(input.type);
|
|
@@ -3163,7 +3268,16 @@ export const stringifySerializedRootNode = input => {
|
|
|
3163
3268
|
expected: "\"paragraph\"",
|
|
3164
3269
|
value: input.type
|
|
3165
3270
|
});
|
|
3166
|
-
})()},"version":${input.version},"direction":${
|
|
3271
|
+
})()},"version":${input.version},"direction":${null !== input.direction ? (() => {
|
|
3272
|
+
if ("string" === typeof input.direction)
|
|
3273
|
+
return $string(input.direction);
|
|
3274
|
+
if ("string" === typeof input.direction)
|
|
3275
|
+
return "\"" + input.direction + "\"";
|
|
3276
|
+
$throws({
|
|
3277
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
3278
|
+
value: input.direction
|
|
3279
|
+
});
|
|
3280
|
+
})() : "null"},"format":${$string(input.format)},"indent":${input.indent},"textFormat":${input.textFormat},"textStyle":${$string(input.textStyle)},"children":${`[${input.children.map(elem => $su0(elem)).join(",")}]`}}`;
|
|
3167
3281
|
const $so2 = input => `{"type":${(() => {
|
|
3168
3282
|
if ("string" === typeof input.type)
|
|
3169
3283
|
return $string(input.type);
|
|
@@ -3239,8 +3353,8 @@ export const stringifySerializedRootNode = input => {
|
|
|
3239
3353
|
};
|
|
3240
3354
|
export const assertStringifySerializedRootNode = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
3241
3355
|
const __is = input => {
|
|
3242
|
-
const $io0 = input => "root" === input.type && 1 === input.version && "
|
|
3243
|
-
const $io1 = input => "paragraph" === input.type && 1 === input.version && "
|
|
3356
|
+
const $io0 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && ("number" === typeof input.indent && !Number.isNaN(input.indent)) && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
3357
|
+
const $io1 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && ("number" === typeof input.indent && !Number.isNaN(input.indent)) && ("number" === typeof input.textFormat && !Number.isNaN(input.textFormat)) && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
3244
3358
|
const $io2 = input => "text" === input.type && 1 === input.version && ("number" === typeof input.detail && !Number.isNaN(input.detail)) && ("number" === typeof input.format && !Number.isNaN(input.format)) && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
3245
3359
|
const $io3 = input => "linebreak" === input.type && 1 === input.version;
|
|
3246
3360
|
const $io4 = input => "mention" === input.type && 1 === input.version && ("number" === typeof input.detail && !Number.isNaN(input.detail)) && ("number" === typeof input.format && !Number.isNaN(input.format)) && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -3277,9 +3391,9 @@ export const assertStringifySerializedRootNode = (input, errorFactory) => { cons
|
|
|
3277
3391
|
path: _path + ".version",
|
|
3278
3392
|
expected: "1",
|
|
3279
3393
|
value: input.version
|
|
3280
|
-
}, errorFactory)) && ("
|
|
3394
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
3281
3395
|
path: _path + ".direction",
|
|
3282
|
-
expected: "
|
|
3396
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
3283
3397
|
value: input.direction
|
|
3284
3398
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
3285
3399
|
path: _path + ".format",
|
|
@@ -3314,9 +3428,9 @@ export const assertStringifySerializedRootNode = (input, errorFactory) => { cons
|
|
|
3314
3428
|
path: _path + ".version",
|
|
3315
3429
|
expected: "1",
|
|
3316
3430
|
value: input.version
|
|
3317
|
-
}, errorFactory)) && ("
|
|
3431
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
3318
3432
|
path: _path + ".direction",
|
|
3319
|
-
expected: "
|
|
3433
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
3320
3434
|
value: input.direction
|
|
3321
3435
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
3322
3436
|
path: _path + ".format",
|
|
@@ -3482,8 +3596,8 @@ export const assertStringifySerializedRootNode = (input, errorFactory) => { cons
|
|
|
3482
3596
|
})(input, "$input", true);
|
|
3483
3597
|
return input;
|
|
3484
3598
|
}; const stringify = input => {
|
|
3485
|
-
const $io0 = input => "root" === input.type && 1 === input.version && "
|
|
3486
|
-
const $io1 = input => "paragraph" === input.type && 1 === input.version && "
|
|
3599
|
+
const $io0 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
3600
|
+
const $io1 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && "number" === typeof input.textFormat && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
3487
3601
|
const $io2 = input => "text" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
3488
3602
|
const $io3 = input => "linebreak" === input.type && 1 === input.version;
|
|
3489
3603
|
const $io4 = input => "mention" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -3518,7 +3632,16 @@ export const assertStringifySerializedRootNode = (input, errorFactory) => { cons
|
|
|
3518
3632
|
expected: "\"root\"",
|
|
3519
3633
|
value: input.type
|
|
3520
3634
|
});
|
|
3521
|
-
})()},"version":${input.version},"direction":${
|
|
3635
|
+
})()},"version":${input.version},"direction":${null !== input.direction ? (() => {
|
|
3636
|
+
if ("string" === typeof input.direction)
|
|
3637
|
+
return $string(input.direction);
|
|
3638
|
+
if ("string" === typeof input.direction)
|
|
3639
|
+
return "\"" + input.direction + "\"";
|
|
3640
|
+
$throws({
|
|
3641
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
3642
|
+
value: input.direction
|
|
3643
|
+
});
|
|
3644
|
+
})() : "null"},"format":${$string(input.format)},"indent":${input.indent},"children":${`[${input.children.map(elem => $su0(elem)).join(",")}]`}}`;
|
|
3522
3645
|
const $so1 = input => `{"type":${(() => {
|
|
3523
3646
|
if ("string" === typeof input.type)
|
|
3524
3647
|
return $string(input.type);
|
|
@@ -3528,7 +3651,16 @@ export const assertStringifySerializedRootNode = (input, errorFactory) => { cons
|
|
|
3528
3651
|
expected: "\"paragraph\"",
|
|
3529
3652
|
value: input.type
|
|
3530
3653
|
});
|
|
3531
|
-
})()},"version":${input.version},"direction":${
|
|
3654
|
+
})()},"version":${input.version},"direction":${null !== input.direction ? (() => {
|
|
3655
|
+
if ("string" === typeof input.direction)
|
|
3656
|
+
return $string(input.direction);
|
|
3657
|
+
if ("string" === typeof input.direction)
|
|
3658
|
+
return "\"" + input.direction + "\"";
|
|
3659
|
+
$throws({
|
|
3660
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
3661
|
+
value: input.direction
|
|
3662
|
+
});
|
|
3663
|
+
})() : "null"},"format":${$string(input.format)},"indent":${input.indent},"textFormat":${input.textFormat},"textStyle":${$string(input.textStyle)},"children":${`[${input.children.map(elem => $su0(elem)).join(",")}]`}}`;
|
|
3532
3664
|
const $so2 = input => `{"type":${(() => {
|
|
3533
3665
|
if ("string" === typeof input.type)
|
|
3534
3666
|
return $string(input.type);
|
|
@@ -3603,8 +3735,8 @@ export const assertStringifySerializedRootNode = (input, errorFactory) => { cons
|
|
|
3603
3735
|
return $so0(input);
|
|
3604
3736
|
}; return stringify(assert(input, errorFactory)); };
|
|
3605
3737
|
export const isSerializedParagraphNode = input => {
|
|
3606
|
-
const $io0 = input => "paragraph" === input.type && 1 === input.version && "
|
|
3607
|
-
const $io1 = input => "root" === input.type && 1 === input.version && "
|
|
3738
|
+
const $io0 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && "number" === typeof input.textFormat && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
3739
|
+
const $io1 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
3608
3740
|
const $io2 = input => "text" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
3609
3741
|
const $io3 = input => "linebreak" === input.type && 1 === input.version;
|
|
3610
3742
|
const $io4 = input => "mention" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -3632,8 +3764,8 @@ export const isSerializedParagraphNode = input => {
|
|
|
3632
3764
|
};
|
|
3633
3765
|
export const assertSerializedParagraphNode = (input, errorFactory) => {
|
|
3634
3766
|
const __is = input => {
|
|
3635
|
-
const $io0 = input => "paragraph" === input.type && 1 === input.version && "
|
|
3636
|
-
const $io1 = input => "root" === input.type && 1 === input.version && "
|
|
3767
|
+
const $io0 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && "number" === typeof input.textFormat && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
3768
|
+
const $io1 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
3637
3769
|
const $io2 = input => "text" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
3638
3770
|
const $io3 = input => "linebreak" === input.type && 1 === input.version;
|
|
3639
3771
|
const $io4 = input => "mention" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -3670,9 +3802,9 @@ export const assertSerializedParagraphNode = (input, errorFactory) => {
|
|
|
3670
3802
|
path: _path + ".version",
|
|
3671
3803
|
expected: "1",
|
|
3672
3804
|
value: input.version
|
|
3673
|
-
}, errorFactory)) && ("
|
|
3805
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
3674
3806
|
path: _path + ".direction",
|
|
3675
|
-
expected: "
|
|
3807
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
3676
3808
|
value: input.direction
|
|
3677
3809
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
3678
3810
|
path: _path + ".format",
|
|
@@ -3715,9 +3847,9 @@ export const assertSerializedParagraphNode = (input, errorFactory) => {
|
|
|
3715
3847
|
path: _path + ".version",
|
|
3716
3848
|
expected: "1",
|
|
3717
3849
|
value: input.version
|
|
3718
|
-
}, errorFactory)) && ("
|
|
3850
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
3719
3851
|
path: _path + ".direction",
|
|
3720
|
-
expected: "
|
|
3852
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
3721
3853
|
value: input.direction
|
|
3722
3854
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
3723
3855
|
path: _path + ".format",
|
|
@@ -3876,12 +4008,16 @@ export const assertSerializedParagraphNode = (input, errorFactory) => {
|
|
|
3876
4008
|
return input;
|
|
3877
4009
|
};
|
|
3878
4010
|
export const randomSerializedParagraphNode = generator => {
|
|
3879
|
-
const $generator = __typia.createRandom.generator;
|
|
3880
4011
|
const $pick = __typia.createRandom.pick;
|
|
4012
|
+
const $generator = __typia.createRandom.generator;
|
|
3881
4013
|
const $ro0 = (_recursive = true, _depth = 0) => ({
|
|
3882
4014
|
type: "paragraph",
|
|
3883
4015
|
version: 1,
|
|
3884
|
-
direction:
|
|
4016
|
+
direction: $pick([
|
|
4017
|
+
() => null,
|
|
4018
|
+
() => "ltr",
|
|
4019
|
+
() => "rtl"
|
|
4020
|
+
])(),
|
|
3885
4021
|
format: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
3886
4022
|
indent: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
3887
4023
|
textFormat: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
@@ -3899,7 +4035,11 @@ export const randomSerializedParagraphNode = generator => {
|
|
|
3899
4035
|
const $ro1 = (_recursive = true, _depth = 0) => ({
|
|
3900
4036
|
type: "root",
|
|
3901
4037
|
version: 1,
|
|
3902
|
-
direction:
|
|
4038
|
+
direction: $pick([
|
|
4039
|
+
() => null,
|
|
4040
|
+
() => "ltr",
|
|
4041
|
+
() => "rtl"
|
|
4042
|
+
])(),
|
|
3903
4043
|
format: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
3904
4044
|
indent: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
3905
4045
|
children: _recursive && 5 < _depth ? [] : 5 >= _depth ? (generator?.array ?? $generator.array)(() => $pick([
|
|
@@ -3949,8 +4089,8 @@ export const randomSerializedParagraphNode = generator => {
|
|
|
3949
4089
|
};
|
|
3950
4090
|
export const assertGuardSerializedParagraphNode = (input, errorFactory) => {
|
|
3951
4091
|
const __is = input => {
|
|
3952
|
-
const $io0 = input => "paragraph" === input.type && 1 === input.version && "
|
|
3953
|
-
const $io1 = input => "root" === input.type && 1 === input.version && "
|
|
4092
|
+
const $io0 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && "number" === typeof input.textFormat && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
4093
|
+
const $io1 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
3954
4094
|
const $io2 = input => "text" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
3955
4095
|
const $io3 = input => "linebreak" === input.type && 1 === input.version;
|
|
3956
4096
|
const $io4 = input => "mention" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -3987,9 +4127,9 @@ export const assertGuardSerializedParagraphNode = (input, errorFactory) => {
|
|
|
3987
4127
|
path: _path + ".version",
|
|
3988
4128
|
expected: "1",
|
|
3989
4129
|
value: input.version
|
|
3990
|
-
}, errorFactory)) && ("
|
|
4130
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
3991
4131
|
path: _path + ".direction",
|
|
3992
|
-
expected: "
|
|
4132
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
3993
4133
|
value: input.direction
|
|
3994
4134
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
3995
4135
|
path: _path + ".format",
|
|
@@ -4032,9 +4172,9 @@ export const assertGuardSerializedParagraphNode = (input, errorFactory) => {
|
|
|
4032
4172
|
path: _path + ".version",
|
|
4033
4173
|
expected: "1",
|
|
4034
4174
|
value: input.version
|
|
4035
|
-
}, errorFactory)) && ("
|
|
4175
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
4036
4176
|
path: _path + ".direction",
|
|
4037
|
-
expected: "
|
|
4177
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
4038
4178
|
value: input.direction
|
|
4039
4179
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
4040
4180
|
path: _path + ".format",
|
|
@@ -4192,8 +4332,8 @@ export const assertGuardSerializedParagraphNode = (input, errorFactory) => {
|
|
|
4192
4332
|
})(input, "$input", true);
|
|
4193
4333
|
};
|
|
4194
4334
|
export const stringifySerializedParagraphNode = input => {
|
|
4195
|
-
const $io0 = input => "paragraph" === input.type && 1 === input.version && "
|
|
4196
|
-
const $io1 = input => "root" === input.type && 1 === input.version && "
|
|
4335
|
+
const $io0 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && "number" === typeof input.textFormat && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
4336
|
+
const $io1 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
4197
4337
|
const $io2 = input => "text" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
4198
4338
|
const $io3 = input => "linebreak" === input.type && 1 === input.version;
|
|
4199
4339
|
const $io4 = input => "mention" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -4228,7 +4368,16 @@ export const stringifySerializedParagraphNode = input => {
|
|
|
4228
4368
|
expected: "\"paragraph\"",
|
|
4229
4369
|
value: input.type
|
|
4230
4370
|
});
|
|
4231
|
-
})()},"version":${input.version},"direction":${
|
|
4371
|
+
})()},"version":${input.version},"direction":${null !== input.direction ? (() => {
|
|
4372
|
+
if ("string" === typeof input.direction)
|
|
4373
|
+
return $string(input.direction);
|
|
4374
|
+
if ("string" === typeof input.direction)
|
|
4375
|
+
return "\"" + input.direction + "\"";
|
|
4376
|
+
$throws({
|
|
4377
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
4378
|
+
value: input.direction
|
|
4379
|
+
});
|
|
4380
|
+
})() : "null"},"format":${$string(input.format)},"indent":${input.indent},"textFormat":${input.textFormat},"textStyle":${$string(input.textStyle)},"children":${`[${input.children.map(elem => $su0(elem)).join(",")}]`}}`;
|
|
4232
4381
|
const $so1 = input => `{"type":${(() => {
|
|
4233
4382
|
if ("string" === typeof input.type)
|
|
4234
4383
|
return $string(input.type);
|
|
@@ -4238,7 +4387,16 @@ export const stringifySerializedParagraphNode = input => {
|
|
|
4238
4387
|
expected: "\"root\"",
|
|
4239
4388
|
value: input.type
|
|
4240
4389
|
});
|
|
4241
|
-
})()},"version":${input.version},"direction":${
|
|
4390
|
+
})()},"version":${input.version},"direction":${null !== input.direction ? (() => {
|
|
4391
|
+
if ("string" === typeof input.direction)
|
|
4392
|
+
return $string(input.direction);
|
|
4393
|
+
if ("string" === typeof input.direction)
|
|
4394
|
+
return "\"" + input.direction + "\"";
|
|
4395
|
+
$throws({
|
|
4396
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
4397
|
+
value: input.direction
|
|
4398
|
+
});
|
|
4399
|
+
})() : "null"},"format":${$string(input.format)},"indent":${input.indent},"children":${`[${input.children.map(elem => $su0(elem)).join(",")}]`}}`;
|
|
4242
4400
|
const $so2 = input => `{"type":${(() => {
|
|
4243
4401
|
if ("string" === typeof input.type)
|
|
4244
4402
|
return $string(input.type);
|
|
@@ -4314,8 +4472,8 @@ export const stringifySerializedParagraphNode = input => {
|
|
|
4314
4472
|
};
|
|
4315
4473
|
export const assertStringifySerializedParagraphNode = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
4316
4474
|
const __is = input => {
|
|
4317
|
-
const $io0 = input => "paragraph" === input.type && 1 === input.version && "
|
|
4318
|
-
const $io1 = input => "root" === input.type && 1 === input.version && "
|
|
4475
|
+
const $io0 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && ("number" === typeof input.indent && !Number.isNaN(input.indent)) && ("number" === typeof input.textFormat && !Number.isNaN(input.textFormat)) && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
4476
|
+
const $io1 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && ("number" === typeof input.indent && !Number.isNaN(input.indent)) && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
4319
4477
|
const $io2 = input => "text" === input.type && 1 === input.version && ("number" === typeof input.detail && !Number.isNaN(input.detail)) && ("number" === typeof input.format && !Number.isNaN(input.format)) && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
4320
4478
|
const $io3 = input => "linebreak" === input.type && 1 === input.version;
|
|
4321
4479
|
const $io4 = input => "mention" === input.type && 1 === input.version && ("number" === typeof input.detail && !Number.isNaN(input.detail)) && ("number" === typeof input.format && !Number.isNaN(input.format)) && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -4352,9 +4510,9 @@ export const assertStringifySerializedParagraphNode = (input, errorFactory) => {
|
|
|
4352
4510
|
path: _path + ".version",
|
|
4353
4511
|
expected: "1",
|
|
4354
4512
|
value: input.version
|
|
4355
|
-
}, errorFactory)) && ("
|
|
4513
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
4356
4514
|
path: _path + ".direction",
|
|
4357
|
-
expected: "
|
|
4515
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
4358
4516
|
value: input.direction
|
|
4359
4517
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
4360
4518
|
path: _path + ".format",
|
|
@@ -4397,9 +4555,9 @@ export const assertStringifySerializedParagraphNode = (input, errorFactory) => {
|
|
|
4397
4555
|
path: _path + ".version",
|
|
4398
4556
|
expected: "1",
|
|
4399
4557
|
value: input.version
|
|
4400
|
-
}, errorFactory)) && ("
|
|
4558
|
+
}, errorFactory)) && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction || $guard(_exceptionable, {
|
|
4401
4559
|
path: _path + ".direction",
|
|
4402
|
-
expected: "
|
|
4560
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
4403
4561
|
value: input.direction
|
|
4404
4562
|
}, errorFactory)) && ("string" === typeof input.format || $guard(_exceptionable, {
|
|
4405
4563
|
path: _path + ".format",
|
|
@@ -4557,8 +4715,8 @@ export const assertStringifySerializedParagraphNode = (input, errorFactory) => {
|
|
|
4557
4715
|
})(input, "$input", true);
|
|
4558
4716
|
return input;
|
|
4559
4717
|
}; const stringify = input => {
|
|
4560
|
-
const $io0 = input => "paragraph" === input.type && 1 === input.version && "
|
|
4561
|
-
const $io1 = input => "root" === input.type && 1 === input.version && "
|
|
4718
|
+
const $io0 = input => "paragraph" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && "number" === typeof input.textFormat && "string" === typeof input.textStyle && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
4719
|
+
const $io1 = input => "root" === input.type && 1 === input.version && (null === input.direction || "ltr" === input.direction || "rtl" === input.direction) && "string" === typeof input.format && "number" === typeof input.indent && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && $iu0(elem)));
|
|
4562
4720
|
const $io2 = input => "text" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text;
|
|
4563
4721
|
const $io3 = input => "linebreak" === input.type && 1 === input.version;
|
|
4564
4722
|
const $io4 = input => "mention" === input.type && 1 === input.version && "number" === typeof input.detail && "number" === typeof input.format && "string" === typeof input.mode && "string" === typeof input.style && "string" === typeof input.text && "string" === typeof input.mentionId;
|
|
@@ -4593,7 +4751,16 @@ export const assertStringifySerializedParagraphNode = (input, errorFactory) => {
|
|
|
4593
4751
|
expected: "\"paragraph\"",
|
|
4594
4752
|
value: input.type
|
|
4595
4753
|
});
|
|
4596
|
-
})()},"version":${input.version},"direction":${
|
|
4754
|
+
})()},"version":${input.version},"direction":${null !== input.direction ? (() => {
|
|
4755
|
+
if ("string" === typeof input.direction)
|
|
4756
|
+
return $string(input.direction);
|
|
4757
|
+
if ("string" === typeof input.direction)
|
|
4758
|
+
return "\"" + input.direction + "\"";
|
|
4759
|
+
$throws({
|
|
4760
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
4761
|
+
value: input.direction
|
|
4762
|
+
});
|
|
4763
|
+
})() : "null"},"format":${$string(input.format)},"indent":${input.indent},"textFormat":${input.textFormat},"textStyle":${$string(input.textStyle)},"children":${`[${input.children.map(elem => $su0(elem)).join(",")}]`}}`;
|
|
4597
4764
|
const $so1 = input => `{"type":${(() => {
|
|
4598
4765
|
if ("string" === typeof input.type)
|
|
4599
4766
|
return $string(input.type);
|
|
@@ -4603,7 +4770,16 @@ export const assertStringifySerializedParagraphNode = (input, errorFactory) => {
|
|
|
4603
4770
|
expected: "\"root\"",
|
|
4604
4771
|
value: input.type
|
|
4605
4772
|
});
|
|
4606
|
-
})()},"version":${input.version},"direction":${
|
|
4773
|
+
})()},"version":${input.version},"direction":${null !== input.direction ? (() => {
|
|
4774
|
+
if ("string" === typeof input.direction)
|
|
4775
|
+
return $string(input.direction);
|
|
4776
|
+
if ("string" === typeof input.direction)
|
|
4777
|
+
return "\"" + input.direction + "\"";
|
|
4778
|
+
$throws({
|
|
4779
|
+
expected: "(\"ltr\" | \"rtl\" | null)",
|
|
4780
|
+
value: input.direction
|
|
4781
|
+
});
|
|
4782
|
+
})() : "null"},"format":${$string(input.format)},"indent":${input.indent},"children":${`[${input.children.map(elem => $su0(elem)).join(",")}]`}}`;
|
|
4607
4783
|
const $so2 = input => `{"type":${(() => {
|
|
4608
4784
|
if ("string" === typeof input.type)
|
|
4609
4785
|
return $string(input.type);
|