/
stateManagement.data.ts
131 lines (129 loc) · 3.05 KB
/
stateManagement.data.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
import { initDotvvm, fc, waitForEnd } from "./helper";
initDotvvm({
viewModel: {
$type: "t1",
Int: 1,
Str: "A",
Array: [{
$type: "t2",
Id: 1
}],
Enums: [ "A", "B", "A, B" ],
ArrayWillBe: null,
Inner: {
$type: "t3",
P1: 1,
P2: 2,
P3: 3
},
Inner2: null
},
typeMetadata: {
t1: {
type: "object",
properties: {
Int: {
type: "Int32"
},
Str: {
type: "String"
},
Array: {
type: [
"t2"
]
},
Enums: {
type: [ "e1" ]
},
ArrayWillBe: {
type: [
"t5"
]
},
Inner: {
type: "t3"
},
Inner2: {
type: "t3"
},
DateTime: { type: { type: "nullable", inner: "DateTime" } },
Dynamic: {
type: { type: "dynamic" }
}
}
},
t2: {
type: "object",
properties: {
Id: {
type: "Int32"
}
}
},
t3_a: {
type: "object",
properties: {
"P1": {
type: "Int32"
},
"P2": {
type: { type: "nullable", inner: "Int32" }
}
}
},
t3: {
type: "object",
properties: {
"P1": {
type: "Int32"
},
"P2": {
type: { type: "nullable", inner: "Int32" }
},
"P3": {
type: "Int32"
},
"P4": {
type: { type: "nullable", inner: "Int32" }
}
}
},
t4: {
type: "object",
properties: {
"P": {
type: "String"
}
}
},
t5: {
type: "object",
properties: {
"B": {
type: "String"
}
}
},
e1: {
type: "enum",
isFlags: true,
values: {
"A": 1,
"B": 2,
"C": 4,
"D": 8,
}
},
tValidated: {
type: "object",
properties: {
RegexValidated: {
validationRules: [
{ ruleName: "regularExpression", errorMessage: "Must have even length", parameters: ["^(..)+$"] }
]
}
}
}
}
})