Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3493329
D12367.id41144.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
D12367.id41144.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D12367: [lib] Add $ReadOnly wrapper around type spreads in socket-types.js
Attached
Detach File
Event Timeline
Log In to Comment