Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3380257
D10685.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
D10685.diff
View Options
diff --git a/lib/keyserver-conn/call-keyserver-endpoint-provider.react.js b/lib/keyserver-conn/call-keyserver-endpoint-provider.react.js
--- a/lib/keyserver-conn/call-keyserver-endpoint-provider.react.js
+++ b/lib/keyserver-conn/call-keyserver-endpoint-provider.react.js
@@ -21,7 +21,6 @@
} from '../utils/call-server-endpoint.js';
import callServerEndpoint from '../utils/call-server-endpoint.js';
-export type ActionFunc<F> = (callServerEndpoint: CallServerEndpoint) => F;
type CreateCallSingleKeyserverEndpointSelector = (
keyserverID: string,
) => ServerCallSelectorParams => CallServerEndpoint;
diff --git a/lib/utils/action-utils.js b/lib/utils/action-utils.js
--- a/lib/utils/action-utils.js
+++ b/lib/utils/action-utils.js
@@ -3,15 +3,17 @@
import invariant from 'invariant';
import * as React from 'react';
+import type { CallServerEndpoint } from './call-server-endpoint.js';
import { useSelector, useDispatch } from './redux-utils.js';
import { ashoatKeyserverID } from './validation-utils.js';
import {
- type ActionFunc,
type ServerCallSelectorParams,
useCallKeyserverEndpointContext,
} from '../keyserver-conn/call-keyserver-endpoint-provider.react.js';
import { serverCallStateSelector } from '../selectors/server-calls.js';
+type ActionFunc<F> = (callServerEndpoint: CallServerEndpoint) => F;
+
function useServerCall<F>(
serverCall: ActionFunc<F>,
paramOverride?: ?Partial<ServerCallSelectorParams>,
diff --git a/lib/utils/keyserver-call.js b/lib/utils/keyserver-call.js
--- a/lib/utils/keyserver-call.js
+++ b/lib/utils/keyserver-call.js
@@ -24,7 +24,7 @@
options?: ?CallServerEndpointOptions,
) => Promise<{ +[keyserverID: string]: any }>;
-export type ActionFunc<Args: mixed, Return> = (
+type ActionFunc<Args: mixed, Return> = (
callServerEndpoint: CallKeyserverEndpoint,
// The second argument is only used in actions that call all keyservers,
// and the request to all keyservers are exactly the same.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 28, 10:32 PM (19 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2595038
Default Alt Text
D10685.diff (1 KB)
Attached To
Mode
D10685: [lib] Make ActionFunc types local
Attached
Detach File
Event Timeline
Log In to Comment