UNPKG

@dittolive/ditto

Version:

Ditto is a cross-platform SDK that allows apps to sync with and even without internet connectivity.

24 lines (20 loc) 680 B
import type { TurboModule } from 'react-native'; import { TurboModuleRegistry } from 'react-native'; export interface Spec extends TurboModule { /** * Installs the JSI bindings for Ditto SDK. * This is a synchronous method that registers all ~200 FFI functions * directly on the JavaScript global object via JSI. * * @returns true if installation was successful, false otherwise */ install(): boolean; /** * Gets platform-specific directory paths and constants. * This is called once during module initialization. */ getConstants(): { DEFAULT_DIRECTORY: string; }; } export default TurboModuleRegistry.getEnforcing<Spec>('DittoRNSDK');