/** * Copyright (c) Facebook, Inc. and its affiliates. Confidential and proprietary. * * @flow strict-local * @format * @oncall recoil */ 'use strict'; import type {StoreID as StoreIDType} from 'Recoil_Keys'; const { getRecoilTestFn, } = require('recoil-shared/__test_utils__/Recoil_TestingUtils'); let React, renderElements, RecoilRoot, useRecoilStoreID; const testRecoil = getRecoilTestFn(() => { React = require('react'); ({ renderElements, } = require('recoil-shared/__test_utils__/Recoil_TestingUtils')); ({RecoilRoot, useRecoilStoreID} = require('../Recoil_RecoilRoot')); }); testRecoil('useRecoilStoreID', () => { const storeIDs: {[string]: StoreIDType} = {}; function StoreID({ rootKey, }: | $TEMPORARY$object<{rootKey: $TEMPORARY$string<'A'>}> | $TEMPORARY$object<{rootKey: $TEMPORARY$string<'A1'>}> | $TEMPORARY$object<{rootKey: $TEMPORARY$string<'A2'>}> | $TEMPORARY$object<{rootKey: $TEMPORARY$string<'B'>}>) { const storeID = useRecoilStoreID(); storeIDs[rootKey] = storeID; return null; } function MyApp() { return (