diff --git a/lib/utils/config.js b/lib/utils/config.js index 66e6afb2e..5b73af960 100644 --- a/lib/utils/config.js +++ b/lib/utils/config.js @@ -1,36 +1,36 @@ // @flow import invariant from 'invariant'; import type { DispatchRecoveryAttempt } from './action-utils.js'; import type { CallServerEndpoint } from './call-server-endpoint.js'; import type { CallKeyserverEndpoint } from './keyserver-call.js'; import type { LogInActionSource } from '../types/account-types.js'; import type { PlatformDetails } from '../types/device-types.js'; export type Config = { +resolveInvalidatedCookie: ?( callServerEndpoint: CallServerEndpoint, callKeyserverEndpoint: CallKeyserverEndpoint, dispatchRecoveryAttempt: DispatchRecoveryAttempt, logInActionSource: LogInActionSource, keyserverID: string, getInitialNotificationsEncryptedMessage?: () => Promise, ) => Promise, +setSessionIDOnRequest: boolean, +calendarRangeInactivityLimit: ?number, +platformDetails: PlatformDetails, }; let registeredConfig: ?Config = null; -const registerConfig = (config: $Shape) => { +const registerConfig = (config: Config) => { registeredConfig = { ...registeredConfig, ...config }; }; const getConfig = (): Config => { invariant(registeredConfig, 'config should be set'); return registeredConfig; }; export { registerConfig, getConfig };