/** * The client entry's public value surface — the API freeze gate (#59). Any added * or removed runtime export fails this until the list is updated deliberately, so * the documented API and the exported API cannot silently diverge. (Types are * erased at runtime; the `react-server` surface is pinned in `index.server.test.ts`, * and knip fails the gate on an exported symbol nothing uses.) */ import { describe, expect, it } from 'vitest'; import * as client from './index.client.ts'; describe('client entry public surface (frozen)', () => { it('exports exactly this set of runtime values', () => { expect(Object.keys(client).sort()).toEqual( [ 'AtomTypeId', 'HookTypeId', 'Inspector', 'Observe', 'PlacementTypeId', 'QueryCache', 'RecTypeId', 'Runtime', 'SuspensableTypeId', 'atom', 'atomFamily', 'batch', 'connectReduxDevtools', 'defer', 'derive', 'hook', 'isAtom', 'isHook', 'isPlacement', 'isSuspensable', 'mount', 'mutation', 'observe', 'placement', 'query', 'readRenderLedger', 'rec', 'scoped', 'suspend', 'useAtom', 'useAtomSet', 'useAtomValue', 'useEffractRuntime', ].sort(), ); }); });