// Copyright 2019 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only export function makeLookup( items: ReadonlyArray, key: keyof T ): Record { const result: Record = {}; for (const item of items) { if (item != null && item[key] !== undefined) { result[String(item[key])] = item; } } return result; }