/** * React Native runtime access: a thin platform binding over the * platform-agnostic runtime singleton in `@keewano/core`. The core * singleton stores and returns the base `KeewanoRuntime`; the * lifecycle accessors are re-exported unchanged, while `getRuntime` / * `getRuntimeOrNull` are narrowed to the React Native `SdkRuntime` * superset (init always installs an `SdkRuntime`, so the narrow is * sound). `allocBatchNum` lives here because `nextBatchNum` is a * React Native runtime field, not part of the shared contract. */ import type { SdkRuntime } from './types/runtime'; /** Narrow the active runtime to `SdkRuntime`; init always installs one. */ declare function getRuntime(): SdkRuntime; /** Non-throwing narrowing variant; `null` before init. */ declare function getRuntimeOrNull(): SdkRuntime | null; /** * Allocate the next monotonic `batchNum` and advance the runtime's * counter. Centralized so the send-loop tick and the shutdown flush * share one source. `nextBatchNum` is a React Native runtime field * (send-loop wiring), so this stays in the platform layer. * * @returns The pre-increment counter value; the next call returns the * value after. */ declare function allocBatchNum(runtime: SdkRuntime): number; export type { SdkRuntime } from './types/runtime'; export { clearRuntime, drainPreInitQueue, enqueuePreInit, getInitPromise, isInitialized, isInitializing, setInitPromise, setRuntime, } from '@keewano/core'; export { allocBatchNum, getRuntime, getRuntimeOrNull };