Page MenuHomePhabricator

D12367.id41144.diff
No OneTemporary

D12367.id41144.diff

diff --git a/lib/types/socket-types.js b/lib/types/socket-types.js
--- a/lib/types/socket-types.js
+++ b/lib/types/socket-types.js
@@ -228,12 +228,12 @@
currentUserInfo: currentUserInfoValidator,
});
-export type ServerStateSyncFullSocketPayload = {
+export type ServerStateSyncFullSocketPayload = $ReadOnly<{
...ServerFullStateSync,
+type: 0,
// Included iff client is using sessionIdentifierTypes.BODY_SESSION_ID
+sessionID?: string,
-};
+}>;
const serverStateSyncFullSocketPayloadValidator =
tShape<ServerStateSyncFullSocketPayload>({
...serverFullStateSyncValidator.meta.props,
@@ -255,33 +255,33 @@
userInfos: t.list(userInfoValidator),
});
-export type ClientIncrementalStateSync = {
+export type ClientIncrementalStateSync = $ReadOnly<{
...BaseIncrementalStateSync,
+updatesResult: ClientUpdatesResult,
-};
-export type StateSyncIncrementalActionPayload = {
+}>;
+export type StateSyncIncrementalActionPayload = $ReadOnly<{
...ClientIncrementalStateSync,
+calendarQuery: CalendarQuery,
+keyserverID: string,
-};
-type ClientStateSyncIncrementalSocketPayload = {
+}>;
+export type ClientStateSyncIncrementalSocketPayload = $ReadOnly<{
+type: 1,
...ClientIncrementalStateSync,
-};
+}>;
-export type ServerIncrementalStateSync = {
+export type ServerIncrementalStateSync = $ReadOnly<{
...BaseIncrementalStateSync,
+updatesResult: ServerUpdatesResult,
-};
+}>;
const serverIncrementalStateSyncValidator = tShape<ServerIncrementalStateSync>({
...baseIncrementalStateSyncValidator.meta.props,
updatesResult: serverUpdatesResultValidator,
});
-type ServerStateSyncIncrementalSocketPayload = {
+type ServerStateSyncIncrementalSocketPayload = $ReadOnly<{
+type: 1,
...ServerIncrementalStateSync,
-};
+}>;
const serverStateSyncIncrementalSocketPayloadValidator =
tShape<ServerStateSyncIncrementalSocketPayload>({
type: tNumber(stateSyncPayloadTypes.INCREMENTAL),

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 2:50 AM (21 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2679922
Default Alt Text
D12367.id41144.diff (1 KB)

Event Timeline