Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3381882
D5643.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D5643.diff
View Options
diff --git a/lib/actions/draft-actions.js b/lib/actions/draft-actions.js
new file mode 100644
--- /dev/null
+++ b/lib/actions/draft-actions.js
@@ -0,0 +1,7 @@
+// @flow
+
+const updateDraftActionType = 'UPDATE_DRAFT';
+const moveDraftActionType = 'MOVE_DRAFT';
+const setDraftStoreDrafts = 'SET_DRAFT_STORE_DRAFTS';
+
+export { updateDraftActionType, moveDraftActionType, setDraftStoreDrafts };
diff --git a/lib/types/draft-types.js b/lib/types/draft-types.js
new file mode 100644
--- /dev/null
+++ b/lib/types/draft-types.js
@@ -0,0 +1,25 @@
+// @flow
+
+export type DraftStore = {
+ +drafts: { +[key: string]: string },
+};
+
+export type UpdateDraftOperation = {
+ +type: 'update',
+ +payload: { +key: string, +text: string },
+};
+
+export type MoveDraftOperation = {
+ +type: 'move',
+ +payload: { +oldKey: string, +newKey: string },
+};
+
+export type RemoveAllDraftsOperation = {
+ +type: 'remove_all',
+};
+
+export type DraftStoreOperation =
+ | UpdateDraftOperation
+ | MoveDraftOperation
+ | RemoveAllDraftsOperation;
+export type ClientDBDraftStoreOperation = DraftStoreOperation;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 6:57 AM (21 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2596266
Default Alt Text
D5643.diff (1 KB)
Attached To
Mode
D5643: Introduce drafts related types and redux actions
Attached
Detach File
Event Timeline
Log In to Comment