Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3524914
D5982.id19988.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
D5982.id19988.diff
View Options
diff --git a/keyserver/src/responders/website-responders.js b/keyserver/src/responders/website-responders.js
--- a/keyserver/src/responders/website-responders.js
+++ b/keyserver/src/responders/website-responders.js
@@ -27,7 +27,6 @@
import { defaultEnabledReports } from 'lib/types/report-types';
import { defaultConnectionInfo } from 'lib/types/socket-types';
import { threadPermissions, threadTypes } from 'lib/types/thread-types';
-import type { CurrentUserInfo } from 'lib/types/user-types';
import { currentDateInTimeZone } from 'lib/utils/date-utils';
import { ServerError } from 'lib/utils/errors';
import { promiseAll } from 'lib/utils/promises';
@@ -306,7 +305,7 @@
const statePromises = {
navInfo: navInfoPromise,
deviceID: null,
- currentUserInfo: ((currentUserInfoPromise: any): Promise<CurrentUserInfo>),
+ currentUserInfo: currentUserInfoPromise,
draftStore: { drafts: {} },
sessionID: sessionIDPromise,
entryStore: entryStorePromise,
diff --git a/keyserver/src/utils/json-stream.js b/keyserver/src/utils/json-stream.js
--- a/keyserver/src/utils/json-stream.js
+++ b/keyserver/src/utils/json-stream.js
@@ -5,8 +5,7 @@
import replaceStream from 'replacestream';
import Combine from 'stream-combiner';
-type Promisable<T> = Promise<T> | T;
-function streamJSON<T: { [key: string]: Promisable<*> }>(
+function streamJSON<T: { +[key: string]: mixed }>(
res: $Response,
input: T,
): stream$Readable {
@@ -19,7 +18,7 @@
return jsonStream;
}
-function resolvePromisesToStream<T: { [key: string]: Promisable<*> }>(
+function resolvePromisesToStream<T: { +[key: string]: mixed }>(
stream: { +write: ([string, mixed]) => mixed, +end: () => mixed, ... },
input: T,
) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 3:07 PM (9 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2700274
Default Alt Text
D5982.id19988.diff (1 KB)
Attached To
Mode
D5982: [keyserver] Fix JSONStream types
Attached
Detach File
Event Timeline
Log In to Comment