Page MenuHomePhabricator

D5643.diff
No OneTemporary

D5643.diff

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

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)

Event Timeline