diff --git a/lib/types/keyserver-types.js b/lib/types/keyserver-types.js index 7b30d09f9..ab4735281 100644 --- a/lib/types/keyserver-types.js +++ b/lib/types/keyserver-types.js @@ -1,28 +1,28 @@ // @flow import t, { type TInterface } from 'tcomb'; import { tShape } from '../utils/validation-utils.js'; // Once we start using the cookie field on web, -// the cookie field type should be changed to string | null. +// the cookie field should be mandatory, of type ?string. // See https://linear.app/comm/issue/ENG-4347/stop-using-browser-cookies export type KeyserverInfo = { +cookie?: ?string, +sessionID?: ?string, }; export type KeyserverStore = { +keyserverInfos: { +[key: string]: KeyserverInfo }, }; export const keyserverInfoValidator: TInterface = tShape({ cookie: t.maybe(t.String), sessionID: t.maybe(t.String), }); export const keyserverStoreValidator: TInterface = tShape({ keyserverInfos: t.dict(t.String, keyserverInfoValidator), });