Skip to content

Commit 47fde4c

Browse files
Update src/content/docs/workers/tutorials/build-a-content-version-system/index.mdx
Co-authored-by: db-cloudflare <[email protected]>
1 parent d75affe commit 47fde4c

File tree

1 file changed

+8
-1
lines changed
  • src/content/docs/workers/tutorials/build-a-content-version-system

1 file changed

+8
-1
lines changed

src/content/docs/workers/tutorials/build-a-content-version-system/index.mdx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,14 @@ You can find source code for this project on: [GitHub](https://github.com/shinch
181181

182182
**src/types.ts: Interface definitions for data structures**
183183

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:
185192

186193
```
187194
/**

0 commit comments

Comments
 (0)