You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 20, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: docs/api.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,10 @@ Can be a string or a function. If given a function, accepts the following argume
41
41
* `parent`: The parent object of the input array.
42
42
* `key`: The key at which the input array appears on the parent object.
43
43
44
+
#### Instance Methods
45
+
46
+
*`define(definition)`: When used, the `definition` passed in will be merged with the original definition passed to the `Array` constructor. This method tends to be useful for creating circular references in schema.
47
+
44
48
#### Usage
45
49
46
50
To describe a simple array of a singular entity type:
@@ -89,6 +93,11 @@ You *do not* need to define any keys in your entity other than those that hold n
89
93
*`parent`: The parent object of the input array.
90
94
*`key`: The key at which the input array appears on the parent object.
91
95
96
+
#### Instance Methods
97
+
98
+
*`define(definition)`: When used, the `definition` passed in will be merged with the original definition passed to the `Entity` constructor. This method tends to be useful for creating circular references in schema.
99
+
*`key`: Returns the key provided to the constructor.
100
+
92
101
#### Usage
93
102
94
103
```js
@@ -115,6 +124,10 @@ Define a plain object mapping that has values needing to be normalized into Enti
115
124
*`definition`: **required** A definition of the nested entities found within this object. Defaults to empty object.
116
125
You *do not* need to define any keys in your object other than those that hold other entities. All other values will be copied to the normalized output.
117
126
127
+
#### Instance Methods
128
+
129
+
*`define(definition)`: When used, the `definition` passed in will be merged with the original definition passed to the `Object` constructor. This method tends to be useful for creating circular references in schema.
130
+
118
131
#### Usage
119
132
120
133
```js
@@ -140,6 +153,10 @@ Can be a string or a function. If given a function, accepts the following argume
140
153
*`parent`: The parent object of the input array.
141
154
*`key`: The key at which the input array appears on the parent object.
142
155
156
+
#### Instance Methods
157
+
158
+
*`define(definition)`: When used, the `definition` passed in will be merged with the original definition passed to the `Union` constructor. This method tends to be useful for creating circular references in schema.
159
+
143
160
#### Usage
144
161
145
162
```js
@@ -166,6 +183,10 @@ Can be a string or a function. If given a function, accepts the following argume
166
183
*`parent`: The parent object of the input array.
167
184
*`key`: The key at which the input array appears on the parent object.
168
185
186
+
#### Instance Methods
187
+
188
+
*`define(definition)`: When used, the `definition` passed in will be merged with the original definition passed to the `Values` constructor. This method tends to be useful for creating circular references in schema.
0 commit comments