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
Copy file name to clipboardExpand all lines: src/content/docs/workers/tutorials/build-a-content-version-system/index.mdx
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,7 +181,14 @@ You can find source code for this project on: [GitHub](https://github.com/shinch
181
181
182
182
**src/types.ts: Interface definitions for data structures**
183
183
184
-
In this file, we will define data structures that will be used in the Durable Objects and the Worker. The purpose is to make sure that the data structures are consistent and more efficiently state management.
184
+
The data structures that will be used by the Durable Object and the Worker to handle state management must first be defined. In this step the following data will be defined:
185
+
186
+
- The different states a content version can have (`draft`, `published` and `archived`).
187
+
- The core data structure for version management, such as a version id number, the contained content and the attached version message.
188
+
- The data structure to track version events and history.
189
+
- The API response structure.
190
+
191
+
Add the following code to the `src/types.ts` file:
0 commit comments